2020-04-02 16:09:01 -05:00
|
|
|
- // MIR for `main` before UninhabitedEnumBranching
|
|
|
|
+ // MIR for `main` after UninhabitedEnumBranching
|
|
|
|
|
|
|
|
fn main() -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
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;
|
2020-04-02 16:09:01 -05:00
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
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];
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_5);
|
|
|
|
_5 = const "C";
|
|
|
|
_1 = &(*_5);
|
|
|
|
StorageDead(_5);
|
|
|
|
goto -> bb5;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-06-06 08:47:00 -05:00
|
|
|
unreachable;
|
2022-07-26 08:17:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_1 = const "A(Empty)";
|
|
|
|
goto -> bb5;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2022-07-26 08:17:02 -05:00
|
|
|
bb4: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_4);
|
|
|
|
_4 = const "B(Empty)";
|
|
|
|
_1 = &(*_4);
|
|
|
|
StorageDead(_4);
|
|
|
|
goto -> bb5;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2022-07-26 08:17:02 -05:00
|
|
|
bb5: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_2);
|
|
|
|
StorageDead(_1);
|
|
|
|
StorageLive(_6);
|
|
|
|
StorageLive(_7);
|
|
|
|
_7 = Test2::D;
|
|
|
|
_8 = discriminant(_7);
|
|
|
|
switchInt(move _8) -> [4: bb7, 5: bb6, otherwise: bb2];
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2022-07-26 08:17:02 -05:00
|
|
|
bb6: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_9);
|
|
|
|
_9 = const "E";
|
|
|
|
_6 = &(*_9);
|
|
|
|
StorageDead(_9);
|
|
|
|
goto -> bb8;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2022-07-26 08:17:02 -05:00
|
|
|
bb7: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_6 = const "D";
|
|
|
|
goto -> bb8;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2023-02-24 15:32:10 -06:00
|
|
|
bb8: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_6);
|
|
|
|
_0 = const ();
|
|
|
|
return;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|