From 50b6f46f719bdba477ebb481f3cfe903507f3199 Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Wed, 11 Oct 2023 08:25:08 +0000 Subject: [PATCH] small cleanup --- compiler/rustc_ast_lowering/src/item.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index edc1e2f0b84d9..5bfc956aba198 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, }),