Skip to content

Commit 8c2c695

Browse files
committed
Simplify back-edge logic.
1 parent ada7f1c commit 8c2c695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_mir_transform/src/ctfe_limit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn has_back_edge(
4747
return false;
4848
}
4949
// Check if any of the dominators of the node are also the node's successor.
50-
doms.dominators(node).any(|dom| node_data.terminator().successors().any(|succ| succ == dom))
50+
node_data.terminator().successors().any(|succ| doms.dominates(succ, node))
5151
}
5252

5353
fn insert_counter(basic_block_data: &mut BasicBlockData<'_>) {

0 commit comments

Comments
 (0)