rust/tests/mir-opt/uninhabited_enum_branching.simple.UninhabitedEnumBranching.diff

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.1 KiB
Diff
Raw Normal View History

2023-10-21 13:45:25 +00:00
- // MIR for `simple` before UninhabitedEnumBranching
+ // MIR for `simple` after UninhabitedEnumBranching
2020-04-02 21:09:01 +00:00
2023-10-21 13:45:25 +00:00
fn simple() -> () {
2023-06-06 13:47:00 +00:00
let mut _0: ();
let _1: &str;
let mut _2: Test1;
let mut _3: isize;
let _4: &str;
let _5: &str;
2020-04-02 21:09:01 +00:00
bb0: {
2023-06-06 13:47:00 +00:00
StorageLive(_1);
StorageLive(_2);
_2 = Test1::C;
_3 = discriminant(_2);
2024-02-12 03:56:03 +00:00
- switchInt(move _3) -> [0: bb3, 1: bb4, 2: bb2, otherwise: bb1];
+ switchInt(move _3) -> [0: bb6, 1: bb6, 2: bb2, otherwise: bb6];
2020-04-02 21:09:01 +00:00
}
bb1: {
2024-02-12 03:56:03 +00:00
unreachable;
}
bb2: {
2023-06-06 13:47:00 +00:00
StorageLive(_5);
_5 = const "C";
_1 = &(*_5);
StorageDead(_5);
goto -> bb5;
2020-04-02 21:09:01 +00:00
}
2022-07-26 13:17:02 +00:00
bb3: {
2023-06-06 13:47:00 +00:00
_1 = const "A(Empty)";
goto -> bb5;
2020-04-02 21:09:01 +00:00
}
2022-07-26 13:17:02 +00:00
bb4: {
2023-06-06 13:47:00 +00:00
StorageLive(_4);
_4 = const "B(Empty)";
_1 = &(*_4);
StorageDead(_4);
goto -> bb5;
2020-04-02 21:09:01 +00:00
}
2022-07-26 13:17:02 +00:00
bb5: {
2023-06-06 13:47:00 +00:00
StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
+ }
+
2023-10-21 13:45:25 +00:00
+ bb6: {
+ unreachable;
2020-04-02 21:09:01 +00:00
}
}