diff options
| author | A4-Tacks <wdsjxhno1001@163.com> | 2025-09-22 14:18:48 +0800 |
|---|---|---|
| committer | A4-Tacks <wdsjxhno1001@163.com> | 2025-09-22 14:32:46 +0800 |
| commit | dc805bf49844d7bde1013f817c4368c1c3c485aa (patch) | |
| tree | 2ea6783ac206ba1162cbfa12961cf70086426bd2 /compiler/rustc_mir_transform/src/coverage/mod.rs | |
| parent | 45dda35957ed322c3bccd094dcfa9b925336cc8d (diff) | |
| download | rust-dc805bf49844d7bde1013f817c4368c1c3c485aa.tar.gz rust-dc805bf49844d7bde1013f817c4368c1c3c485aa.zip | |
Fix apply in internal if for pull_assignment_up
Example
---
```rust
fn foo() {
let mut a = 1;
if true {
a = 2;
} else if true {
$0a = 3;
} else {
a = 4;
}
}
```
**Before this PR**:
```rust
fn foo() {
let mut a = 1;
if true {
a = 2;
} else a = if true {
3
} else {
4
};
}
```
**After this PR**:
```rust
fn foo() {
let mut a = 1;
a = if true {
2
} else if true {
3
} else {
4
};
}
```
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/mod.rs')
0 files changed, 0 insertions, 0 deletions
