about summary refs log tree commit diff
path: root/compiler/rustc_infer/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-19 19:21:35 +0000
committerbors <bors@rust-lang.org>2022-12-19 19:21:35 +0000
commit935dc07218b4bf6e20231e44eb9263b612fd649b (patch)
tree7f23c9ee1cc4a2b3a7160dac735c5e510636b375 /compiler/rustc_infer/src
parent7ab803891dd95a04f3b2143e40b26f03b608b4bc (diff)
parentf705d646738ea8b1238e1c9a58c16532cc4d73a6 (diff)
downloadrust-935dc07218b4bf6e20231e44eb9263b612fd649b.tar.gz
rust-935dc07218b4bf6e20231e44eb9263b612fd649b.zip
Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorino
Address some `EarlyBinder` nits
Diffstat (limited to 'compiler/rustc_infer/src')
-rw-r--r--compiler/rustc_infer/src/infer/outlives/verify.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/rustc_infer/src/infer/outlives/verify.rs b/compiler/rustc_infer/src/infer/outlives/verify.rs
index 136da4a3cb1..40bbec8ddd0 100644
--- a/compiler/rustc_infer/src/infer/outlives/verify.rs
+++ b/compiler/rustc_infer/src/infer/outlives/verify.rs
@@ -5,7 +5,7 @@ use crate::infer::{GenericKind, VerifyBound};
 use rustc_data_structures::sso::SsoHashSet;
 use rustc_hir::def_id::DefId;
 use rustc_middle::ty::GenericArg;
-use rustc_middle::ty::{self, EarlyBinder, OutlivesPredicate, SubstsRef, Ty, TyCtxt};
+use rustc_middle::ty::{self, OutlivesPredicate, SubstsRef, Ty, TyCtxt};
 
 use smallvec::smallvec;
 
@@ -304,14 +304,13 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
         substs: SubstsRef<'tcx>,
     ) -> impl Iterator<Item = ty::Region<'tcx>> {
         let tcx = self.tcx;
-        let bounds = tcx.item_bounds(def_id);
-        trace!("{:#?}", bounds);
+        let bounds = tcx.bound_item_bounds(def_id);
+        trace!("{:#?}", bounds.0);
         bounds
-            .into_iter()
+            .subst_iter(tcx, substs)
             .filter_map(|p| p.to_opt_type_outlives())
             .filter_map(|p| p.no_bound_vars())
-            .map(|b| b.1)
-            .map(move |r| EarlyBinder(r).subst(tcx, substs))
+            .map(|OutlivesPredicate(_, r)| r)
     }
 
     /// Searches through a predicate list for a predicate `T: 'a`.