File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
compiler/rustc_mir_transform/src Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -639,7 +639,7 @@ impl OpportunitySet {
639639 let Some ( ( current, chain) ) = op_chain. split_first ( ) else { return } ;
640640 let basic_blocks = body. basic_blocks . as_mut ( ) ;
641641
642- // Invariant: we never change the meaning of the program .
642+ // Invariant: the control-flow is well-formed at the end of each iteration .
643643 let mut current = * current;
644644 for & succ in chain {
645645 debug ! ( ?current, ?succ) ;
@@ -697,8 +697,9 @@ impl OpportunitySet {
697697 new_involved. push ( ( to_index, in_to_index + 1 ) ) ;
698698 }
699699 }
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.
702703 let _new_succ = self . involving_tos . push ( new_involved) ;
703704 debug_assert_eq ! ( new_succ, _new_succ) ;
704705
You can’t perform that action at this time.
0 commit comments