File tree 1 file changed +4
-3
lines changed
compiler/rustc_mir_transform/src
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -639,7 +639,7 @@ impl OpportunitySet {
639
639
let Some ( ( current, chain) ) = op_chain. split_first ( ) else { return } ;
640
640
let basic_blocks = body. basic_blocks . as_mut ( ) ;
641
641
642
- // Invariant: we never change the meaning of the program .
642
+ // Invariant: the control-flow is well-formed at the end of each iteration .
643
643
let mut current = * current;
644
644
for & succ in chain {
645
645
debug ! ( ?current, ?succ) ;
@@ -697,8 +697,9 @@ impl OpportunitySet {
697
697
new_involved. push ( ( to_index, in_to_index + 1 ) ) ;
698
698
}
699
699
}
700
- // Following TOs new reference `new_succ`, so we will need to update them if we
701
- // duplicate `new_succ` later.
700
+
701
+ // The TOs that we just updated now reference `new_succ`. Update `involving_tos`
702
+ // in case we need to duplicate an edge starting at `new_succ` later.
702
703
let _new_succ = self . involving_tos . push ( new_involved) ;
703
704
debug_assert_eq ! ( new_succ, _new_succ) ;
704
705
You can’t perform that action at this time.
0 commit comments