about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/select
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-11-26 21:21:20 +0000
committerMichael Goulet <michael@errs.io>2022-12-13 17:34:44 +0000
commit5c6afb850c29f5604f685bf4d4fea85a2deb7197 (patch)
treeb89915de1c6af256c67a1c2fe1fbdba8cb68cf70 /compiler/rustc_trait_selection/src/traits/select
parent7f3af726065d9eaabf93d87f22d97f60cca7a5f1 (diff)
downloadrust-5c6afb850c29f5604f685bf4d4fea85a2deb7197.tar.gz
rust-5c6afb850c29f5604f685bf4d4fea85a2deb7197.zip
ProjectionTy.item_def_id -> ProjectionTy.def_id
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/select')
-rw-r--r--compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs2
-rw-r--r--compiler/rustc_trait_selection/src/traits/select/confirmation.rs2
-rw-r--r--compiler/rustc_trait_selection/src/traits/select/mod.rs4
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
index 4cd2d445bd0..509a4c01727 100644
--- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
+++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
@@ -537,7 +537,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
                 self,
                 param_env,
                 ty::ProjectionTy {
-                    item_def_id: tcx.lang_items().deref_target()?,
+                    def_id: tcx.lang_items().deref_target()?,
                     substs: trait_ref.substs,
                 },
                 cause.clone(),
diff --git a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs
index cd3025024fe..cfc77a1a1d5 100644
--- a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs
+++ b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs
@@ -155,7 +155,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
         let placeholder_self_ty = placeholder_trait_predicate.self_ty();
         let placeholder_trait_predicate = ty::Binder::dummy(placeholder_trait_predicate);
         let (def_id, substs) = match *placeholder_self_ty.kind() {
-            ty::Projection(proj) => (proj.item_def_id, proj.substs),
+            ty::Projection(proj) => (proj.def_id, proj.substs),
             ty::Opaque(ty::OpaqueTy { def_id, substs }) => (def_id, substs),
             _ => bug!("projection candidate for unexpected type: {:?}", placeholder_self_ty),
         };
diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs
index 054bbf8fb0e..e279d6bfdbc 100644
--- a/compiler/rustc_trait_selection/src/traits/select/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs
@@ -1595,7 +1595,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
 
         let tcx = self.infcx.tcx;
         let (def_id, substs) = match *placeholder_trait_predicate.trait_ref.self_ty().kind() {
-            ty::Projection(ref data) => (data.item_def_id, data.substs),
+            ty::Projection(ref data) => (data.def_id, data.substs),
             ty::Opaque(ty::OpaqueTy { def_id, substs }) => (def_id, substs),
             _ => {
                 span_bug!(
@@ -1745,7 +1745,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
             });
 
         if is_match {
-            let generics = self.tcx().generics_of(obligation.predicate.item_def_id);
+            let generics = self.tcx().generics_of(obligation.predicate.def_id);
             // FIXME(generic-associated-types): Addresses aggressive inference in #92917.
             // If this type is a GAT, and of the GAT substs resolve to something new,
             // that means that we must have newly inferred something about the GAT.