cleanup
This commit is contained in:
parent
e41072479e
commit
6dc6a1f947
3 changed files with 4 additions and 4 deletions
|
@ -936,7 +936,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||
})
|
||||
});
|
||||
|
||||
lowered_generics.params = lowered_generics.params.into_iter().chain(in_band_defs).collect();
|
||||
lowered_generics.params.extend(in_band_defs);
|
||||
|
||||
let lowered_generics = lowered_generics.into_generics(self.arena);
|
||||
(lowered_generics, res)
|
||||
|
|
|
@ -1299,8 +1299,8 @@ fn object_lifetime_defaults_for_item(
|
|||
GenericParamKind::Const { .. } => {
|
||||
// Generic consts don't impose any constraints.
|
||||
//
|
||||
// We still store a dummy value here to allow generic paramters
|
||||
// in arbitrary order.
|
||||
// We still store a dummy value here to allow generic parameters
|
||||
// in an arbitrary order.
|
||||
Some(Set1::Empty)
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1374,7 +1374,7 @@ fn generics_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::Generics {
|
|||
|lint| {
|
||||
lint.build(
|
||||
"defaults for type parameters are only allowed in \
|
||||
`struct`, `enum`, `type`, or `trait` definitions.",
|
||||
`struct`, `enum`, `type`, or `trait` definitions.",
|
||||
)
|
||||
.emit();
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue