Skip to content

Commit 2a08860

Browse files
committed
Simplify RegionConstraintCollector::vars_since_snapshot
1 parent 92b2021 commit 2a08860

File tree

1 file changed

+1
-6
lines changed
  • src/librustc/infer/region_constraints

1 file changed

+1
-6
lines changed

src/librustc/infer/region_constraints/mod.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -841,12 +841,7 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
841841
}
842842

843843
pub fn vars_since_snapshot(&self, mark: &RegionSnapshot) -> Vec<RegionVid> {
844-
self.undo_log[mark.length..]
845-
.iter()
846-
.filter_map(|&elt| match elt {
847-
AddVar(vid) => Some(vid),
848-
_ => None,
849-
}).collect()
844+
self.unification_table.vars_since_snapshot(&mark.region_snapshot).collect()
850845
}
851846

852847
/// See [`RegionInference::region_constraints_added_in_snapshot`].

0 commit comments

Comments
 (0)