Skip to content

Commit 98a2de4

Browse files
authored
Rollup merge of rust-lang#116627 - fee1-dead-contrib:cleanup, r=spastorino
small cleanup this is exactly the same as the `lower_param_bounds` function, so use that instead
2 parents ab679de + 50b6f46 commit 98a2de4

File tree

1 file changed

+4
-6
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+4
-6
lines changed

compiler/rustc_ast_lowering/src/item.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -1623,12 +1623,10 @@ impl<'hir> LoweringContext<'_, 'hir> {
16231623
.lower_generic_params(bound_generic_params, hir::GenericParamSource::Binder),
16241624
bounded_ty: self
16251625
.lower_ty(bounded_ty, &ImplTraitContext::Disallowed(ImplTraitPosition::Bound)),
1626-
bounds: self.arena.alloc_from_iter(bounds.iter().map(|bound| {
1627-
self.lower_param_bound(
1628-
bound,
1629-
&ImplTraitContext::Disallowed(ImplTraitPosition::Bound),
1630-
)
1631-
})),
1626+
bounds: self.lower_param_bounds(
1627+
bounds,
1628+
&ImplTraitContext::Disallowed(ImplTraitPosition::Bound),
1629+
),
16321630
span: self.lower_span(*span),
16331631
origin: PredicateOrigin::WhereClause,
16341632
}),

0 commit comments

Comments
 (0)