2024-03-08 06:56:09 -06:00
|
|
|
- // MIR for `simple` before UnreachableEnumBranching
|
|
|
|
+ // MIR for `simple` after UnreachableEnumBranching
|
2020-04-02 16:09:01 -05:00
|
|
|
|
2023-10-21 08:45:25 -05:00
|
|
|
fn simple() -> () {
|
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;
|
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);
|
2024-02-11 21:56:03 -06:00
|
|
|
- switchInt(move _3) -> [0: bb3, 1: bb4, 2: bb2, otherwise: bb1];
|
2024-02-28 08:35:41 -06:00
|
|
|
+ switchInt(move _3) -> [0: bb1, 1: bb1, 2: bb2, otherwise: bb1];
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2024-02-11 21:56:03 -06:00
|
|
|
unreachable;
|
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
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
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
_0 = const ();
|
|
|
|
return;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|