Skip to content
Permalink
Browse files

Make `vars_since_snapshot` naming consistent

  • Loading branch information...
varkor committed Mar 20, 2019
1 parent 443a2d4 commit 92b2021b0a34262f2aa823fadd462e2437ead2d8
@@ -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))
}
@@ -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 {
@@ -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

0 comments on commit 92b2021

Please sign in to comment.
You can’t perform that action at this time.