Skip to content

Commit b922ae0

Browse files
Make LowerPolyBounds take an IntoIterator
1 parent bfab34a commit b922ae0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler/rustc_hir_analysis/src/collect/predicates_of.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen
267267
let mut bounds = Bounds::default();
268268
icx.lowerer().lower_poly_bounds(
269269
ty,
270-
bound_pred.bounds.iter(),
270+
bound_pred.bounds,
271271
&mut bounds,
272272
bound_vars,
273273
PredicateFilter::All,
@@ -836,7 +836,7 @@ impl<'tcx> ItemCtxt<'tcx> {
836836
let bound_vars = self.tcx.late_bound_vars(predicate.hir_id);
837837
self.lowerer().lower_poly_bounds(
838838
bound_ty,
839-
predicate.bounds.iter(),
839+
predicate.bounds,
840840
&mut bounds,
841841
bound_vars,
842842
filter,

compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
142142
/// There is an implied binder around `param_ty` and `hir_bounds`.
143143
/// See `lower_poly_trait_ref` for more details.
144144
#[instrument(level = "debug", skip(self, hir_bounds, bounds))]
145-
pub(crate) fn lower_poly_bounds<'hir, I: Iterator<Item = &'hir hir::GenericBound<'tcx>>>(
145+
pub(crate) fn lower_poly_bounds<'hir, I: IntoIterator<Item = &'hir hir::GenericBound<'tcx>>>(
146146
&self,
147147
param_ty: Ty<'tcx>,
148148
hir_bounds: I,
@@ -231,7 +231,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
231231

232232
self.lower_poly_bounds(
233233
param_ty,
234-
hir_bounds.iter(),
234+
hir_bounds,
235235
&mut bounds,
236236
ty::List::empty(),
237237
predicate_filter,
@@ -446,7 +446,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
446446
Ty::new_alias(tcx, ty::Projection, projection_ty.skip_binder());
447447
self.lower_poly_bounds(
448448
param_ty,
449-
hir_bounds.iter(),
449+
hir_bounds,
450450
bounds,
451451
projection_ty.bound_vars(),
452452
predicate_filter,

0 commit comments

Comments
 (0)