rust/tests/mir-opt/uninhabited_enum_branching.simple.UninhabitedEnumBranching.diff
2024-02-12 17:37:05 +01:00

58 lines
1.1 KiB
Diff

- // MIR for `simple` before UninhabitedEnumBranching
+ // MIR for `simple` after UninhabitedEnumBranching
fn simple() -> () {
let mut _0: ();
let _1: &str;
let mut _2: Test1;
let mut _3: isize;
let _4: &str;
let _5: &str;
bb0: {
StorageLive(_1);
StorageLive(_2);
_2 = Test1::C;
_3 = discriminant(_2);
- switchInt(move _3) -> [0: bb3, 1: bb4, 2: bb2, otherwise: bb1];
+ switchInt(move _3) -> [0: bb6, 1: bb6, 2: bb2, otherwise: bb6];
}
bb1: {
unreachable;
}
bb2: {
StorageLive(_5);
_5 = const "C";
_1 = &(*_5);
StorageDead(_5);
goto -> bb5;
}
bb3: {
_1 = const "A(Empty)";
goto -> bb5;
}
bb4: {
StorageLive(_4);
_4 = const "B(Empty)";
_1 = &(*_4);
StorageDead(_4);
goto -> bb5;
}
bb5: {
StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
+ }
+
+ bb6: {
+ unreachable;
}
}