2023-10-21 13:45:25 +00:00
|
|
|
- // MIR for `byref` before UninhabitedEnumBranching
|
|
|
|
+ // MIR for `byref` after UninhabitedEnumBranching
|
2021-05-23 13:41:02 +00:00
|
|
|
|
2023-10-21 13:45:25 +00:00
|
|
|
fn byref() -> () {
|
2023-06-06 13:47:00 +00:00
|
|
|
let mut _0: ();
|
|
|
|
let _1: Plop;
|
2023-10-21 13:45:25 +00:00
|
|
|
let mut _2: Test3;
|
2023-06-06 13:47:00 +00:00
|
|
|
let _3: &str;
|
2023-10-21 13:45:25 +00:00
|
|
|
let mut _4: &Test3;
|
2023-06-06 13:47:00 +00:00
|
|
|
let mut _5: isize;
|
|
|
|
let _6: &str;
|
|
|
|
let _7: &str;
|
|
|
|
let _8: &str;
|
|
|
|
let _9: &str;
|
|
|
|
let mut _10: isize;
|
|
|
|
let _11: &str;
|
|
|
|
let _12: &str;
|
|
|
|
let _13: &str;
|
2021-05-23 13:41:02 +00:00
|
|
|
scope 1 {
|
2023-06-06 13:47:00 +00:00
|
|
|
debug plop => _1;
|
2021-05-23 13:41:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageLive(_1);
|
|
|
|
StorageLive(_2);
|
2023-10-21 13:45:25 +00:00
|
|
|
_2 = Test3::C;
|
|
|
|
_1 = Plop { xx: const 51_u32, test3: move _2 };
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageDead(_2);
|
|
|
|
StorageLive(_3);
|
|
|
|
StorageLive(_4);
|
2023-10-21 13:45:25 +00:00
|
|
|
_4 = &(_1.1: Test3);
|
2023-06-06 13:47:00 +00:00
|
|
|
_5 = discriminant((*_4));
|
|
|
|
- switchInt(move _5) -> [0: bb3, 1: bb4, 2: bb5, 3: bb1, otherwise: bb2];
|
2023-07-22 16:59:13 +00:00
|
|
|
+ switchInt(move _5) -> [0: bb12, 1: bb12, 2: bb5, 3: bb1, otherwise: bb12];
|
2021-05-23 13:41:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageLive(_8);
|
|
|
|
_8 = const "D";
|
|
|
|
_3 = &(*_8);
|
|
|
|
StorageDead(_8);
|
|
|
|
goto -> bb6;
|
2021-05-23 13:41:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-06-06 13:47:00 +00:00
|
|
|
unreachable;
|
2022-07-26 13:17:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2023-06-06 13:47:00 +00:00
|
|
|
_3 = const "A(Empty)";
|
|
|
|
goto -> bb6;
|
2021-05-23 13:41:02 +00:00
|
|
|
}
|
|
|
|
|
2022-07-26 13:17:02 +00:00
|
|
|
bb4: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageLive(_6);
|
|
|
|
_6 = const "B(Empty)";
|
|
|
|
_3 = &(*_6);
|
|
|
|
StorageDead(_6);
|
|
|
|
goto -> bb6;
|
2021-05-23 13:41:02 +00:00
|
|
|
}
|
|
|
|
|
2022-07-26 13:17:02 +00:00
|
|
|
bb5: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageLive(_7);
|
|
|
|
_7 = const "C";
|
|
|
|
_3 = &(*_7);
|
|
|
|
StorageDead(_7);
|
|
|
|
goto -> bb6;
|
2021-05-23 13:41:02 +00:00
|
|
|
}
|
|
|
|
|
2022-07-26 13:17:02 +00:00
|
|
|
bb6: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageDead(_4);
|
|
|
|
StorageDead(_3);
|
|
|
|
StorageLive(_9);
|
2023-10-21 13:45:25 +00:00
|
|
|
_10 = discriminant((_1.1: Test3));
|
2023-06-06 13:47:00 +00:00
|
|
|
- switchInt(move _10) -> [0: bb8, 1: bb9, 2: bb10, 3: bb7, otherwise: bb2];
|
2023-07-22 16:59:13 +00:00
|
|
|
+ switchInt(move _10) -> [0: bb12, 1: bb12, 2: bb10, 3: bb7, otherwise: bb12];
|
2021-05-23 13:41:02 +00:00
|
|
|
}
|
|
|
|
|
2022-07-26 13:17:02 +00:00
|
|
|
bb7: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageLive(_13);
|
|
|
|
_13 = const "D";
|
|
|
|
_9 = &(*_13);
|
|
|
|
StorageDead(_13);
|
|
|
|
goto -> bb11;
|
2021-05-23 13:41:02 +00:00
|
|
|
}
|
|
|
|
|
2022-07-26 13:17:02 +00:00
|
|
|
bb8: {
|
2023-06-06 13:47:00 +00:00
|
|
|
_9 = const "A(Empty)";
|
|
|
|
goto -> bb11;
|
2021-05-23 13:41:02 +00:00
|
|
|
}
|
|
|
|
|
2023-02-24 21:32:10 +00:00
|
|
|
bb9: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageLive(_11);
|
|
|
|
_11 = const "B(Empty)";
|
|
|
|
_9 = &(*_11);
|
|
|
|
StorageDead(_11);
|
|
|
|
goto -> bb11;
|
2021-05-23 13:41:02 +00:00
|
|
|
}
|
|
|
|
|
2023-02-24 21:32:10 +00:00
|
|
|
bb10: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageLive(_12);
|
|
|
|
_12 = const "C";
|
|
|
|
_9 = &(*_12);
|
|
|
|
StorageDead(_12);
|
|
|
|
goto -> bb11;
|
2021-05-23 13:41:02 +00:00
|
|
|
}
|
|
|
|
|
2023-02-24 21:32:10 +00:00
|
|
|
bb11: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageDead(_9);
|
|
|
|
_0 = const ();
|
|
|
|
StorageDead(_1);
|
|
|
|
return;
|
2023-07-22 16:59:13 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ bb12: {
|
|
|
|
+ unreachable;
|
2021-05-23 13:41:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|