about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2019-03-20 00:57:25 +0000
committervarkor <github@varkor.com>2019-03-27 09:44:55 +0000
commit92b2021b0a34262f2aa823fadd462e2437ead2d8 (patch)
tree5240f59078770c6351b03348498ec8714792a6fc
parent443a2d4f86258e4d4234ce8ab851a491096dc058 (diff)
downloadrust-92b2021b0a34262f2aa823fadd462e2437ead2d8.tar.gz
rust-92b2021b0a34262f2aa823fadd462e2437ead2d8.zip
Make `vars_since_snapshot` naming consistent
-rw-r--r--src/librustc/infer/fudge.rs12
-rw-r--r--src/librustc/infer/region_constraints/mod.rs2
-rw-r--r--src/librustc/infer/type_variable.rs8
3 files changed, 10 insertions, 12 deletions
diff --git a/src/librustc/infer/fudge.rs b/src/librustc/infer/fudge.rs
index 5f6a8802b4d..4dc4341d4c8 100644
--- a/src/librustc/infer/fudge.rs
+++ b/src/librustc/infer/fudge.rs
@@ -64,12 +64,12 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
                     // going to be popped, so we will have to
                     // eliminate any references to them.
 
-                    let type_variables =
-                        self.type_variables.borrow_mut().types_created_since_snapshot(
-                            &snapshot.type_snapshot);
-                    let region_vars =
-                        self.borrow_region_constraints().vars_created_since_snapshot(
-                            &snapshot.region_constraints_snapshot);
+                    let type_variables = self.type_variables.borrow_mut().vars_since_snapshot(
+                        &snapshot.type_snapshot,
+                    );
+                    let region_vars = self.borrow_region_constraints().vars_since_snapshot(
+                        &snapshot.region_constraints_snapshot,
+                    );
 
                     Ok((type_variables, region_vars, value))
                 }
diff --git a/src/librustc/infer/region_constraints/mod.rs b/src/librustc/infer/region_constraints/mod.rs
index 8389f0ab1aa..fae216c7fe7 100644
--- a/src/librustc/infer/region_constraints/mod.rs
+++ b/src/librustc/infer/region_constraints/mod.rs
@@ -840,7 +840,7 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
         }
     }
 
-    pub fn vars_created_since_snapshot(&self, mark: &RegionSnapshot) -> Vec<RegionVid> {
+    pub fn vars_since_snapshot(&self, mark: &RegionSnapshot) -> Vec<RegionVid> {
         self.undo_log[mark.length..]
             .iter()
             .filter_map(|&elt| match elt {
diff --git a/src/librustc/infer/type_variable.rs b/src/librustc/infer/type_variable.rs
index 4c76818346b..ae7ac855228 100644
--- a/src/librustc/infer/type_variable.rs
+++ b/src/librustc/infer/type_variable.rs
@@ -292,11 +292,9 @@ impl<'tcx> TypeVariableTable<'tcx> {
         self.sub_relations.commit(sub_snapshot);
     }
 
-    /// Returns a map `{V1 -> V2}`, where the keys `{V1}` are
-    /// ty-variables created during the snapshot, and the values
-    /// `{V2}` are the root variables that they were unified with,
-    /// along with their origin.
-    pub fn types_created_since_snapshot(&mut self, s: &Snapshot<'tcx>) -> TypeVariableMap {
+    /// Returns a map from the type variables created during the
+    /// snapshot to the origin of the type variable.
+    pub fn vars_since_snapshot(&mut self, s: &Snapshot<'tcx>) -> TypeVariableMap {
         let actions_since_snapshot = self.values.actions_since_snapshot(&s.snapshot);
 
         actions_since_snapshot