diff options
| author | Kyle Matsuda <kyle.yoshio.matsuda@gmail.com> | 2023-04-17 15:57:29 -0600 |
|---|---|---|
| committer | Kyle Matsuda <kyle.yoshio.matsuda@gmail.com> | 2023-04-20 12:36:50 -0600 |
| commit | 0892a7380b1bde39b979a00de1d11cef3357a717 (patch) | |
| tree | ac39d858274627a769cde8675b05744c005fba57 /compiler/rustc_mir_transform/src | |
| parent | a57fa08f483620c2b4f33c6b5dcdbbf2b4c08ad8 (diff) | |
| download | rust-0892a7380b1bde39b979a00de1d11cef3357a717.tar.gz rust-0892a7380b1bde39b979a00de1d11cef3357a717.zip | |
change usages of explicit_item_bounds to bound_explicit_item_bounds
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/generator.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/generator.rs b/compiler/rustc_mir_transform/src/generator.rs index 507e12d7238..c2c3d2dda3f 100644 --- a/compiler/rustc_mir_transform/src/generator.rs +++ b/compiler/rustc_mir_transform/src/generator.rs @@ -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() |
