Skip to content

Commit 5cad624

Browse files
committed
region_constraints: only push givens into undo-log if in a snapshot
1 parent 492e2f0 commit 5cad624

File tree

1 file changed

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

1 file changed

+3
-1
lines changed

src/librustc/infer/region_constraints/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,9 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
562562
if self.data.givens.insert((sub, sup)) {
563563
debug!("add_given({:?} <= {:?})", sub, sup);
564564

565-
self.undo_log.push(AddGiven(sub, sup));
565+
if self.in_snapshot() {
566+
self.undo_log.push(AddGiven(sub, sup));
567+
}
566568
}
567569
}
568570

0 commit comments

Comments
 (0)