Skip to content

Commit 8ab25fc

Browse files
committed
Fix collapse_goto_chain.
1 parent 67cb824 commit 8ab25fc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_mir_transform/src/simplify.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ impl<'a, 'tcx> CfgSimplifier<'a, 'tcx> {
225225
current = target;
226226
}
227227
let last = current;
228+
*changed |= *start != last;
228229
*start = last;
229230
while let Some((current, mut terminator)) = terminators.pop() {
230231
let Terminator { kind: TerminatorKind::Goto { ref mut target }, .. } = terminator

0 commit comments

Comments
 (0)