Make LowerPolyBounds take an IntoIterator

This commit is contained in:
Michael Goulet 2024-10-20 03:01:49 +00:00
parent bfab34af4c
commit b922ae07b3
2 changed files with 5 additions and 5 deletions

View File

@ -267,7 +267,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen
let mut bounds = Bounds::default();
icx.lowerer().lower_poly_bounds(
ty,
bound_pred.bounds.iter(),
bound_pred.bounds,
&mut bounds,
bound_vars,
PredicateFilter::All,
@ -836,7 +836,7 @@ impl<'tcx> ItemCtxt<'tcx> {
let bound_vars = self.tcx.late_bound_vars(predicate.hir_id);
self.lowerer().lower_poly_bounds(
bound_ty,
predicate.bounds.iter(),
predicate.bounds,
&mut bounds,
bound_vars,
filter,

View File

@ -142,7 +142,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
/// There is an implied binder around `param_ty` and `hir_bounds`.
/// See `lower_poly_trait_ref` for more details.
#[instrument(level = "debug", skip(self, hir_bounds, bounds))]
pub(crate) fn lower_poly_bounds<'hir, I: Iterator<Item = &'hir hir::GenericBound<'tcx>>>(
pub(crate) fn lower_poly_bounds<'hir, I: IntoIterator<Item = &'hir hir::GenericBound<'tcx>>>(
&self,
param_ty: Ty<'tcx>,
hir_bounds: I,
@ -231,7 +231,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
self.lower_poly_bounds(
param_ty,
hir_bounds.iter(),
hir_bounds,
&mut bounds,
ty::List::empty(),
predicate_filter,
@ -446,7 +446,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
Ty::new_alias(tcx, ty::Projection, projection_ty.skip_binder());
self.lower_poly_bounds(
param_ty,
hir_bounds.iter(),
hir_bounds,
bounds,
projection_ty.bound_vars(),
predicate_filter,