]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/ty/visit.rs
Unify Opaque/Projection handling in region outlives code
[rust.git] / compiler / rustc_middle / src / ty / visit.rs
index d5553f84f7517d8531eb348324bef6c259f44b2c..ca445558131380e364370ea518fb37a69a4c7bfa 100644 (file)
@@ -165,6 +165,14 @@ fn is_global(&self) -> bool {
     fn has_late_bound_regions(&self) -> bool {
         self.has_type_flags(TypeFlags::HAS_RE_LATE_BOUND)
     }
+    /// True if there are any late-bound non-region variables
+    fn has_non_region_late_bound(&self) -> bool {
+        self.has_type_flags(TypeFlags::HAS_LATE_BOUND - TypeFlags::HAS_RE_LATE_BOUND)
+    }
+    /// True if there are any late-bound variables
+    fn has_late_bound_vars(&self) -> bool {
+        self.has_type_flags(TypeFlags::HAS_LATE_BOUND)
+    }
 
     /// Indicates whether this value still has parameters/placeholders/inference variables
     /// which could be replaced later, in a way that would change the results of `impl`