1
Fork 0

Rollup merge of #116627 - fee1-dead-contrib:cleanup, r=spastorino

small cleanup

this is exactly the same as the `lower_param_bounds` function, so use that instead
This commit is contained in:
Matthias Krüger 2023-10-11 20:08:22 +02:00 committed by GitHub
commit 8374805d67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1623,12 +1623,10 @@ impl<'hir> LoweringContext<'_, 'hir> {
.lower_generic_params(bound_generic_params, hir::GenericParamSource::Binder), .lower_generic_params(bound_generic_params, hir::GenericParamSource::Binder),
bounded_ty: self bounded_ty: self
.lower_ty(bounded_ty, &ImplTraitContext::Disallowed(ImplTraitPosition::Bound)), .lower_ty(bounded_ty, &ImplTraitContext::Disallowed(ImplTraitPosition::Bound)),
bounds: self.arena.alloc_from_iter(bounds.iter().map(|bound| { bounds: self.lower_param_bounds(
self.lower_param_bound( bounds,
bound, &ImplTraitContext::Disallowed(ImplTraitPosition::Bound),
&ImplTraitContext::Disallowed(ImplTraitPosition::Bound), ),
)
})),
span: self.lower_span(*span), span: self.lower_span(*span),
origin: PredicateOrigin::WhereClause, origin: PredicateOrigin::WhereClause,
}), }),