Skip to content

Commit 92b2021

Browse files
committed
Make vars_since_snapshot naming consistent
1 parent 443a2d4 commit 92b2021

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

src/librustc/infer/fudge.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
6464
// going to be popped, so we will have to
6565
// eliminate any references to them.
6666

67-
let type_variables =
68-
self.type_variables.borrow_mut().types_created_since_snapshot(
69-
&snapshot.type_snapshot);
70-
let region_vars =
71-
self.borrow_region_constraints().vars_created_since_snapshot(
72-
&snapshot.region_constraints_snapshot);
67+
let type_variables = self.type_variables.borrow_mut().vars_since_snapshot(
68+
&snapshot.type_snapshot,
69+
);
70+
let region_vars = self.borrow_region_constraints().vars_since_snapshot(
71+
&snapshot.region_constraints_snapshot,
72+
);
7373

7474
Ok((type_variables, region_vars, value))
7575
}

src/librustc/infer/region_constraints/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
840840
}
841841
}
842842

843-
pub fn vars_created_since_snapshot(&self, mark: &RegionSnapshot) -> Vec<RegionVid> {
843+
pub fn vars_since_snapshot(&self, mark: &RegionSnapshot) -> Vec<RegionVid> {
844844
self.undo_log[mark.length..]
845845
.iter()
846846
.filter_map(|&elt| match elt {

src/librustc/infer/type_variable.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,9 @@ impl<'tcx> TypeVariableTable<'tcx> {
292292
self.sub_relations.commit(sub_snapshot);
293293
}
294294

295-
/// Returns a map `{V1 -> V2}`, where the keys `{V1}` are
296-
/// ty-variables created during the snapshot, and the values
297-
/// `{V2}` are the root variables that they were unified with,
298-
/// along with their origin.
299-
pub fn types_created_since_snapshot(&mut self, s: &Snapshot<'tcx>) -> TypeVariableMap {
295+
/// Returns a map from the type variables created during the
296+
/// snapshot to the origin of the type variable.
297+
pub fn vars_since_snapshot(&mut self, s: &Snapshot<'tcx>) -> TypeVariableMap {
300298
let actions_since_snapshot = self.values.actions_since_snapshot(&s.snapshot);
301299

302300
actions_since_snapshot

0 commit comments

Comments
 (0)