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

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

49 lines
996 B
Diff
Raw Normal View History

2023-10-21 08:45:25 -05:00
- // MIR for `custom_discriminant` before UninhabitedEnumBranching
+ // MIR for `custom_discriminant` after UninhabitedEnumBranching
fn custom_discriminant() -> () {
let mut _0: ();
let _1: &str;
let mut _2: Test2;
let mut _3: isize;
let _4: &str;
bb0: {
StorageLive(_1);
StorageLive(_2);
_2 = Test2::D;
_3 = discriminant(_2);
2024-02-11 21:56:03 -06:00
- switchInt(move _3) -> [4: bb3, 5: bb2, otherwise: bb1];
+ switchInt(move _3) -> [4: bb3, 5: bb2, otherwise: bb5];
2023-10-21 08:45:25 -05:00
}
bb1: {
2024-02-11 21:56:03 -06:00
unreachable;
}
bb2: {
2023-10-21 08:45:25 -05:00
StorageLive(_4);
_4 = const "E";
_1 = &(*_4);
StorageDead(_4);
goto -> bb4;
}
bb3: {
_1 = const "D";
goto -> bb4;
}
bb4: {
StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
+ }
+
+ bb5: {
+ unreachable;
}
}