about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/coverage/json.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-08-13 19:26:35 +0000
committerbors <bors@rust-lang.org>2020-08-13 19:26:35 +0000
commit5e3f1b148db5bfa27fee52464ae1f5d34c49d77b (patch)
tree14f760bd76b3ed28ad68f4b34adf8a2f2ee7398c /src/test/rustdoc-ui/coverage/json.rs
parentb6396b75e782954acb085447fb836c4e0ff5281d (diff)
parent46e5699af97301fc89dadfa5633d6db814df3cc6 (diff)
downloadrust-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