81 lines
1.6 KiB
Diff
81 lines
1.6 KiB
Diff
- // MIR for `main` before UninhabitedEnumBranching
|
|
+ // MIR for `main` after UninhabitedEnumBranching
|
|
|
|
fn main() -> () {
|
|
let mut _0: ();
|
|
let _1: &str;
|
|
let mut _2: Test1;
|
|
let mut _3: isize;
|
|
let _4: &str;
|
|
let _5: &str;
|
|
let _6: &str;
|
|
let mut _7: Test2;
|
|
let mut _8: isize;
|
|
let _9: &str;
|
|
|
|
bb0: {
|
|
StorageLive(_1);
|
|
StorageLive(_2);
|
|
_2 = Test1::C;
|
|
_3 = discriminant(_2);
|
|
- switchInt(move _3) -> [0: bb3, 1: bb4, 2: bb1, otherwise: bb2];
|
|
+ switchInt(move _3) -> [2: bb1, otherwise: bb2];
|
|
}
|
|
|
|
bb1: {
|
|
StorageLive(_5);
|
|
_5 = const "C";
|
|
_1 = &(*_5);
|
|
StorageDead(_5);
|
|
goto -> bb5;
|
|
}
|
|
|
|
bb2: {
|
|
unreachable;
|
|
}
|
|
|
|
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);
|
|
StorageLive(_6);
|
|
StorageLive(_7);
|
|
_7 = Test2::D;
|
|
_8 = discriminant(_7);
|
|
switchInt(move _8) -> [4: bb7, 5: bb6, otherwise: bb2];
|
|
}
|
|
|
|
bb6: {
|
|
StorageLive(_9);
|
|
_9 = const "E";
|
|
_6 = &(*_9);
|
|
StorageDead(_9);
|
|
goto -> bb8;
|
|
}
|
|
|
|
bb7: {
|
|
_6 = const "D";
|
|
goto -> bb8;
|
|
}
|
|
|
|
bb8: {
|
|
StorageDead(_7);
|
|
StorageDead(_6);
|
|
_0 = const ();
|
|
return;
|
|
}
|
|
}
|
|
|