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