]> git.lizzy.rs Git - rust.git/commitdiff
Rename `UndoLogEntry` as `UndoLog`.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 4 Nov 2018 22:34:37 +0000 (09:34 +1100)
committerNicholas Nethercote <nnethercote@mozilla.com>
Sun, 25 Nov 2018 06:54:06 +0000 (17:54 +1100)
So that it matches `librustc_data_structures/snapshot_map/mod.rs` and
the `ena` crate.

src/librustc/infer/region_constraints/mod.rs
src/librustc/infer/region_constraints/taint.rs

index 391bfc428c3bb49696f288a30456ee7a1e1627f6..eb4c0d08f9fa184762990191a59ed2cba1dfc44d 100644 (file)
@@ -11,7 +11,7 @@
 //! See README.md
 
 use self::CombineMapType::*;
-use self::UndoLogEntry::*;
+use self::UndoLog::*;
 
 use super::unify_key;
 use super::{MiscVariable, RegionVariableOrigin, SubregionOrigin};
@@ -59,7 +59,7 @@ pub struct RegionConstraintCollector<'tcx> {
     /// otherwise we end up adding entries for things like the lower
     /// bound on a variable and so forth, which can never be rolled
     /// back.
-    undo_log: Vec<UndoLogEntry<'tcx>>,
+    undo_log: Vec<UndoLog<'tcx>>,
 
     /// When we add a R1 == R2 constriant, we currently add (a) edges
     /// R1 <= R2 and R2 <= R1 and (b) we unify the two regions in this
@@ -254,7 +254,7 @@ struct TwoRegions<'tcx> {
 }
 
 #[derive(Copy, Clone, PartialEq)]
-enum UndoLogEntry<'tcx> {
+enum UndoLog<'tcx> {
     /// Pushed when we start a snapshot.
     OpenSnapshot,
 
@@ -456,7 +456,7 @@ pub fn rollback_to(&mut self, snapshot: RegionSnapshot) {
         self.any_unifications = snapshot.any_unifications;
     }
 
-    fn rollback_undo_entry(&mut self, undo_entry: UndoLogEntry<'tcx>) {
+    fn rollback_undo_entry(&mut self, undo_entry: UndoLog<'tcx>) {
         match undo_entry {
             OpenSnapshot => {
                 panic!("Failure to observe stack discipline");
@@ -548,7 +548,7 @@ pub fn pop_placeholders(
 
         fn kill_constraint<'tcx>(
             placeholders: &FxHashSet<ty::Region<'tcx>>,
-            undo_entry: &UndoLogEntry<'tcx>,
+            undo_entry: &UndoLog<'tcx>,
         ) -> bool {
             match undo_entry {
                 &AddConstraint(Constraint::VarSubVar(..)) => false,
index ef7365276f6d2f07cd18a2fcf3ff6437014006c2..9f08fdcad7eea39a5308357a31d92493782dcf95 100644 (file)
@@ -29,7 +29,7 @@ pub(super) fn new(directions: TaintDirections, initial_region: ty::Region<'tcx>)
     pub(super) fn fixed_point(
         &mut self,
         tcx: TyCtxt<'_, '_, 'tcx>,
-        undo_log: &[UndoLogEntry<'tcx>],
+        undo_log: &[UndoLog<'tcx>],
         verifys: &[Verify<'tcx>],
     ) {
         let mut prev_len = 0;