Do not discard ?Sized type params and suggest their removal

This commit is contained in:
Esteban Küber
2021-07-23 18:47:53 -07:00
parent 5fb3394cbd
commit 15a40c7ee8
32 changed files with 615 additions and 19 deletions

View File

@@ -2160,12 +2160,12 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
tpb: &GenericBound,
itctx: ImplTraitContext<'_, 'hir>,
) -> hir::GenericBound<'hir> {
match *tpb {
GenericBound::Trait(ref ty, modifier) => hir::GenericBound::Trait(
self.lower_poly_trait_ref(ty, itctx),
self.lower_trait_bound_modifier(modifier),
match tpb {
GenericBound::Trait(p, modifier) => hir::GenericBound::Trait(
self.lower_poly_trait_ref(p, itctx),
self.lower_trait_bound_modifier(*modifier),
),
GenericBound::Outlives(ref lifetime) => {
GenericBound::Outlives(lifetime) => {
hir::GenericBound::Outlives(self.lower_lifetime(lifetime))
}
}