about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2023-10-11 08:25:08 +0000
committerDeadbeef <ent3rm4n@gmail.com>2023-10-11 08:25:43 +0000
commit50b6f46f719bdba477ebb481f3cfe903507f3199 (patch)
tree264ad84b9ce824ad38d0535f71699eac0bd148e7
parent8759de0a4935e677fdce99a849addea2d5318da9 (diff)
downloadrust-50b6f46f719bdba477ebb481f3cfe903507f3199.tar.gz
rust-50b6f46f719bdba477ebb481f3cfe903507f3199.zip
small cleanup
-rw-r--r--compiler/rustc_ast_lowering/src/item.rs10
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,
             }),