We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
clear()
1 parent a0245bb commit 6b92d45Copy full SHA for 6b92d45
compiler/rustc_infer/src/infer/undo_log.rs
@@ -138,11 +138,9 @@ impl<'tcx> InferCtxtInner<'tcx> {
138
}
139
140
if self.undo_log.num_open_snapshots == 1 {
141
- // The root snapshot. It's safe to clear the undo log because
142
- // there's no snapshot further out that we might need to roll back
143
- // to.
+ // After the root snapshot the undo log should be empty.
144
assert!(snapshot.undo_len == 0);
145
- self.undo_log.logs.clear();
+ assert!(self.undo_log.logs.is_empty());
146
147
148
self.undo_log.num_open_snapshots -= 1;
0 commit comments