]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_infer/infer/region_constraints/mod.rs
refactor: Extract the undo log to its own modules
[rust.git] / src / librustc_infer / infer / region_constraints / mod.rs
index 5f6f82ddaf98021f7ac43ac19f85c0748cb93b4e..ead2494756ce29d23baae6cbd9970c8f47afaf8e 100644 (file)
@@ -500,7 +500,6 @@ pub fn pop_placeholders(&mut self, placeholders: &FxHashSet<ty::Region<'tcx>>) {
 
         let constraints_to_kill: Vec<usize> = self
             .undo_log
-            .logs
             .iter()
             .enumerate()
             .rev()
@@ -514,7 +513,7 @@ pub fn pop_placeholders(&mut self, placeholders: &FxHashSet<ty::Region<'tcx>>) {
             .collect();
 
         for index in constraints_to_kill {
-            let undo_entry = match &mut self.undo_log.logs[index] {
+            let undo_entry = match &mut self.undo_log[index] {
                 super::UndoLog::RegionConstraintCollector(undo_entry) => {
                     mem::replace(undo_entry, Purged)
                 }
@@ -790,9 +789,9 @@ pub fn vars_since_snapshot(
     }
 
     /// See [`RegionInference::region_constraints_added_in_snapshot`].
-    pub fn region_constraints_added_in_snapshot(&self, mark: &Snapshot<'_>) -> Option<bool> {
+    pub fn region_constraints_added_in_snapshot(&self, mark: &Snapshot<'tcx>) -> Option<bool> {
         self.undo_log
-            .region_constraints(mark.undo_len)
+            .region_constraints_in_snapshot(mark)
             .map(|&elt| match elt {
                 AddConstraint(constraint) => Some(constraint.involves_placeholders()),
                 _ => None,