]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_infer/src/infer/undo_log.rs
Rollup merge of #98101 - vladimir-ea:stdlib_watch_os, r=thomcc
[rust.git] / compiler / rustc_infer / src / infer / undo_log.rs
index 1b696f21cbcf479364509311159e6912478123d5..74a26ebc39f817c0673c1e86e9595312c4d9d8b1 100644 (file)
@@ -185,6 +185,10 @@ pub(crate) fn region_constraints_in_snapshot(
         })
     }
 
+    pub(crate) fn opaque_types_in_snapshot(&self, s: &Snapshot<'tcx>) -> bool {
+        self.logs[s.undo_len..].iter().any(|log| matches!(log, UndoLog::OpaqueTypes(..)))
+    }
+
     pub(crate) fn region_constraints(
         &self,
     ) -> impl Iterator<Item = &'_ region_constraints::UndoLog<'tcx>> + Clone {