Simplify RegionConstraintCollector::vars_since_snapshot
This commit is contained in:
@@ -841,12 +841,7 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn vars_since_snapshot(&self, mark: &RegionSnapshot) -> Vec<RegionVid> {
|
pub fn vars_since_snapshot(&self, mark: &RegionSnapshot) -> Vec<RegionVid> {
|
||||||
self.undo_log[mark.length..]
|
self.unification_table.vars_since_snapshot(&mark.region_snapshot).collect()
|
||||||
.iter()
|
|
||||||
.filter_map(|&elt| match elt {
|
|
||||||
AddVar(vid) => Some(vid),
|
|
||||||
_ => None,
|
|
||||||
}).collect()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// See [`RegionInference::region_constraints_added_in_snapshot`].
|
/// See [`RegionInference::region_constraints_added_in_snapshot`].
|
||||||
|
|||||||
Reference in New Issue
Block a user