diff --git a/src/librustc/infer/fudge.rs b/src/librustc/infer/fudge.rs index 5f6a8802b4de..4dc4341d4c88 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 8389f0ab1aa7..fae216c7fe7b 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 { + pub fn vars_since_snapshot(&self, mark: &RegionSnapshot) -> Vec { 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 4c76818346b4..ae7ac855228d 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