]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_middle/src/infer/mod.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / compiler / rustc_middle / src / infer / mod.rs
index 2350a6ab155464f5c8fa710e793f67b2e41a1c8b..38868c210495374dacfdec9431410001cad04000 100644 (file)
@@ -2,9 +2,8 @@ pub mod canonical;
 pub mod unify_key;
 
 use crate::ty::Region;
-use crate::ty::Ty;
+use crate::ty::{OpaqueTypeKey, Ty};
 use rustc_data_structures::sync::Lrc;
-use rustc_hir::def_id::DefId;
 use rustc_span::Span;
 
 /// Requires that `region` must be equal to one of the regions in `choice_regions`.
@@ -13,10 +12,11 @@ use rustc_span::Span;
 /// ```text
 /// R0 member of [O1..On]
 /// ```
-#[derive(Debug, Clone, HashStable, TypeFoldable, Lift)]
+#[derive(Debug, Clone, HashStable, TypeFoldable, TypeVisitable, Lift)]
 pub struct MemberConstraint<'tcx> {
-    /// The `DefId` of the opaque type causing this constraint: used for error reporting.
-    pub opaque_type_def_id: DefId,
+    /// The `DefId` and substs of the opaque type causing this constraint.
+    /// Used for error reporting.
+    pub key: OpaqueTypeKey<'tcx>,
 
     /// The span where the hidden type was instantiated.
     pub definition_span: Span,