]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_infer/traits/project.rs
refactor: Rename Logs to InferCtxtUndoLogs
[rust.git] / src / librustc_infer / traits / project.rs
index 0c51dafef6fb69b3fdb860bb7af40874da35604b..8cf3987b902ee5cf9e913c87bdbf47e875b0f17f 100644 (file)
@@ -2,7 +2,7 @@
 
 use super::PredicateObligation;
 
-use rustc_data_structures::snapshot_map::{Snapshot, SnapshotMap};
+use rustc_data_structures::snapshot_map::{self, SnapshotMapRef, SnapshotMapStorage};
 use rustc_middle::ty::fold::TypeFoldable;
 use rustc_middle::ty::{self, Ty};
 
@@ -63,7 +63,7 @@ pub fn with<U>(self, value: U) -> Normalized<'tcx, U> {
 // reduce the amount of duplication. Let's see what we get with the Chalk reforms.
 pub struct ProjectionCache<'tcx, 'a> {
     map: &'a mut SnapshotMapStorage<ProjectionCacheKey<'tcx>, ProjectionCacheEntry<'tcx>>,
-    undo_log: &'a mut Logs<'tcx>,
+    undo_log: &'a mut InferCtxtUndoLogs<'tcx>,
 }
 
 #[derive(Default)]
@@ -93,7 +93,7 @@ pub enum ProjectionCacheEntry<'tcx> {
 impl<'tcx> ProjectionCacheStorage<'tcx> {
     pub(crate) fn with_log<'a>(
         &'a mut self,
-        undo_log: &'a mut Logs<'tcx>,
+        undo_log: &'a mut InferCtxtUndoLogs<'tcx>,
     ) -> ProjectionCache<'tcx, 'a> {
         ProjectionCache { map: &mut self.map, undo_log }
     }
@@ -102,7 +102,12 @@ pub(crate) fn with_log<'a>(
 impl<'tcx> ProjectionCache<'tcx, '_> {
     fn map(
         &mut self,
-    ) -> SnapshotMapRef<'_, ProjectionCacheKey<'tcx>, ProjectionCacheEntry<'tcx>, Logs<'tcx>> {
+    ) -> SnapshotMapRef<
+        '_,
+        ProjectionCacheKey<'tcx>,
+        ProjectionCacheEntry<'tcx>,
+        InferCtxtUndoLogs<'tcx>,
+    > {
         self.map.with_log(self.undo_log)
     }