diff options
| author | bors <bors@rust-lang.org> | 2020-08-13 19:26:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-08-13 19:26:35 +0000 |
| commit | 5e3f1b148db5bfa27fee52464ae1f5d34c49d77b (patch) | |
| tree | 14f760bd76b3ed28ad68f4b34adf8a2f2ee7398c /src/test/rustdoc-ui/coverage/json.rs | |
| parent | b6396b75e782954acb085447fb836c4e0ff5281d (diff) | |
| parent | 46e5699af97301fc89dadfa5633d6db814df3cc6 (diff) | |
| download | rust-5e3f1b148db5bfa27fee52464ae1f5d34c49d77b.tar.gz rust-5e3f1b148db5bfa27fee52464ae1f5d34c49d77b.zip | |
Auto merge of #75382 - JulianKnodt:match_branches, r=oli-obk
First iteration of simplify match branches
This is a simple MIR pass that attempts to convert
```
bb0: {
StorageLive(_2);
_3 = discriminant(_1);
switchInt(move _3) -> [0isize: bb2, otherwise: bb1];
}
bb1: {
_2 = const false;
goto -> bb3;
}
bb2: {
_2 = const true;
goto -> bb3;
}
```
into
```
bb0: {
StorageLive(_2);
_3 = discriminant(_1);
_2 = _3 == 0;
goto -> bb3;
}
```
There are still missing components(like checking if the assignments are bools).
Was hoping that this could get some review though.
Handles #75141
r? @oli-obk
Diffstat (limited to 'src/test/rustdoc-ui/coverage/json.rs')
0 files changed, 0 insertions, 0 deletions
