Make vars_since_snapshot naming consistent
This commit is contained in:
parent
443a2d4f86
commit
92b2021b0a
3 changed files with 10 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue