diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2025-05-20 10:01:00 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2025-05-20 10:01:00 +0300 |
| commit | 50a6c5b78938c7cc8dd7cbe81d7364be9b3c5d00 (patch) | |
| tree | 066ddbaa4a972566dccccaeac7d689d1393cd8d5 /compiler/rustc_mir_transform/src/jump_threading.rs | |
| parent | 1dafeea8cfe587aa55131709a46e21283faaeb20 (diff) | |
| parent | a8e4c68dcb4dc1e48a0db294c5323cab0227fcb9 (diff) | |
| download | rust-50a6c5b78938c7cc8dd7cbe81d7364be9b3c5d00.tar.gz rust-50a6c5b78938c7cc8dd7cbe81d7364be9b3c5d00.zip | |
Merge from rust-lang/rust
Diffstat (limited to 'compiler/rustc_mir_transform/src/jump_threading.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/jump_threading.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/jump_threading.rs b/compiler/rustc_mir_transform/src/jump_threading.rs index ada2c0b76cf..31b361ec1a9 100644 --- a/compiler/rustc_mir_transform/src/jump_threading.rs +++ b/compiler/rustc_mir_transform/src/jump_threading.rs @@ -757,12 +757,12 @@ impl OpportunitySet { // Replace `succ` by `new_succ` where it appears. let mut num_edges = 0; - for s in basic_blocks[current].terminator_mut().successors_mut() { + basic_blocks[current].terminator_mut().successors_mut(|s| { if *s == succ { *s = new_succ; num_edges += 1; } - } + }); // Update predecessors with the new block. let _new_succ = self.predecessors.push(num_edges); |
