]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_middle/src/infer/canonical.rs
New upstream version 1.61.0+dfsg1
[rustc.git] / compiler / rustc_middle / src / infer / canonical.rs
index 419ed429246ac889076f23e8bbdf432eda48c7a5..6b7ac883f5cebbc5a6b4abbc0da4b8ddd166a69b 100644 (file)
@@ -178,6 +178,12 @@ pub struct QueryResponse<'tcx, R> {
     pub var_values: CanonicalVarValues<'tcx>,
     pub region_constraints: QueryRegionConstraints<'tcx>,
     pub certainty: Certainty,
+    /// List of opaque types which we tried to compare to another type.
+    /// Inside the query we don't know yet whether the opaque type actually
+    /// should get its hidden type inferred. So we bubble the opaque type
+    /// and the type it was compared against upwards and let the query caller
+    /// handle it.
+    pub opaque_types: Vec<(Ty<'tcx>, Ty<'tcx>)>,
     pub value: R,
 }
 
@@ -214,7 +220,7 @@ pub enum Certainty {
     /// distinguish the two (e.g., due to our preference for where
     /// clauses over impls).
     ///
-    /// After some unifiations and things have been done, it makes
+    /// After some unification and things have been done, it makes
     /// sense to try and prove again -- of course, at that point, the
     /// canonical form will be different, making this a distinct
     /// query.