diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-10-11 20:08:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-11 20:08:22 +0200 |
| commit | 8374805d67d9dfd1f3f33d7ccfd8bb11a7c6446d (patch) | |
| tree | af679f4587b7bd36b4a8676d15a4bae64e63afcd | |
| parent | d2139834be6611c846ec24b50ba83a6647d81bd9 (diff) | |
| parent | 50b6f46f719bdba477ebb481f3cfe903507f3199 (diff) | |
| download | rust-8374805d67d9dfd1f3f33d7ccfd8bb11a7c6446d.tar.gz rust-8374805d67d9dfd1f3f33d7ccfd8bb11a7c6446d.zip | |
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
| -rw-r--r-- | compiler/rustc_ast_lowering/src/item.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index edc1e2f0b84..5bfc956aba1 100644 --- a/compiler/rustc_ast_lowering/src/item.rs +++ b/compiler/rustc_ast_lowering/src/item.rs @@ -1623,12 +1623,10 @@ impl<'hir> LoweringContext<'_, 'hir> { .lower_generic_params(bound_generic_params, hir::GenericParamSource::Binder), bounded_ty: self .lower_ty(bounded_ty, &ImplTraitContext::Disallowed(ImplTraitPosition::Bound)), - bounds: self.arena.alloc_from_iter(bounds.iter().map(|bound| { - self.lower_param_bound( - bound, - &ImplTraitContext::Disallowed(ImplTraitPosition::Bound), - ) - })), + bounds: self.lower_param_bounds( + bounds, + &ImplTraitContext::Disallowed(ImplTraitPosition::Bound), + ), span: self.lower_span(*span), origin: PredicateOrigin::WhereClause, }), |
