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

@ -1800,7 +1800,9 @@ fn check_must_not_suspend_ty<'tcx>(
// FIXME: support adding the attribute to TAITs
ty::Alias(ty::Opaque, ty::AliasTy { def_id: def, .. }) => {
let mut has_emitted = false;
for &(predicate, _) in tcx.explicit_item_bounds(def) {
for bound in tcx.bound_explicit_item_bounds(def).transpose_iter() {
let predicate = bound.map_bound(|&(pred, _)| pred).subst_identity();
// We only look at the `DefId`, so it is safe to skip the binder here.
if let ty::PredicateKind::Clause(ty::Clause::Trait(ref poly_trait_predicate)) =
predicate.kind().skip_binder()