diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-05-17 12:18:55 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-05-17 12:18:55 +0000 |
| commit | 8c2c695c9ee6f5e0f9fb8ef1037f1ec9c9dd94a1 (patch) | |
| tree | 4b437257dd181ebdbbb8ba5d13126085f6d0befe /compiler/rustc_mir_transform/src | |
| parent | ada7f1c2c4900877bac0082ac5482e86b3b3974c (diff) | |
| download | rust-8c2c695c9ee6f5e0f9fb8ef1037f1ec9c9dd94a1.tar.gz rust-8c2c695c9ee6f5e0f9fb8ef1037f1ec9c9dd94a1.zip | |
Simplify back-edge logic.
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/ctfe_limit.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/ctfe_limit.rs b/compiler/rustc_mir_transform/src/ctfe_limit.rs index 1b3ac78fbc6..bf5722b3d00 100644 --- a/compiler/rustc_mir_transform/src/ctfe_limit.rs +++ b/compiler/rustc_mir_transform/src/ctfe_limit.rs @@ -47,7 +47,7 @@ fn has_back_edge( return false; } // Check if any of the dominators of the node are also the node's successor. - doms.dominators(node).any(|dom| node_data.terminator().successors().any(|succ| succ == dom)) + node_data.terminator().successors().any(|succ| doms.dominates(succ, node)) } fn insert_counter(basic_block_data: &mut BasicBlockData<'_>) { |
