Skip to content

Commit 54b61d6

Browse files
committed
Reword TO application comments.
1 parent 66ec098 commit 54b61d6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler/rustc_mir_transform/src/jump_threading.rs

+4-3
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)