change usages of explicit_item_bounds to bound_explicit_item_bounds

This commit is contained in:
Kyle Matsuda
2023-04-17 15:57:29 -06:00
parent a57fa08f48
commit 0892a7380b
13 changed files with 75 additions and 49 deletions

View File

@@ -74,7 +74,9 @@ impl<'tcx> LateLintPass<'tcx> for OpaqueHiddenInferredBound {
// For every projection predicate in the opaque type's explicit bounds,
// check that the type that we're assigning actually satisfies the bounds
// of the associated type.
for &(pred, pred_span) in cx.tcx.explicit_item_bounds(def_id) {
for bound in cx.tcx.bound_explicit_item_bounds(def_id).transpose_iter() {
let (pred, pred_span) = bound.map_bound(|b| *b).subst_identity();
// Liberate bound regions in the predicate since we
// don't actually care about lifetimes in this check.
let predicate = cx.tcx.liberate_late_bound_regions(def_id, pred.kind());