2022-09-04 22:00:31 -05:00
|
|
|
// MIR for `full_tested_match2` after built
|
2020-04-02 16:09:01 -05:00
|
|
|
|
|
|
|
fn full_tested_match2() -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
let mut _0: ();
|
|
|
|
let mut _1: (i32, i32);
|
|
|
|
let mut _2: std::option::Option<i32>;
|
|
|
|
let mut _3: isize;
|
|
|
|
let mut _4: &std::option::Option<i32>;
|
|
|
|
let _5: i32;
|
|
|
|
let _6: &i32;
|
|
|
|
let mut _7: bool;
|
|
|
|
let mut _8: i32;
|
|
|
|
let _9: i32;
|
|
|
|
let mut _10: i32;
|
2020-04-02 16:09:01 -05:00
|
|
|
scope 1 {
|
|
|
|
}
|
|
|
|
scope 2 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug x => _5;
|
|
|
|
debug x => _6;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
scope 3 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug y => _9;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_1);
|
|
|
|
StorageLive(_2);
|
|
|
|
_2 = Option::<i32>::Some(const 42_i32);
|
2022-10-15 04:00:32 -05:00
|
|
|
PlaceMention(_2);
|
2023-06-06 08:47:00 -05:00
|
|
|
_3 = discriminant(_2);
|
|
|
|
switchInt(move _3) -> [0: bb1, 1: bb2, otherwise: bb4];
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2020-10-02 15:11:24 -05:00
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
falseEdge -> [real: bb10, imaginary: bb3];
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-06-06 08:47:00 -05:00
|
|
|
falseEdge -> [real: bb5, imaginary: bb1];
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_9);
|
|
|
|
_9 = ((_2 as Some).0: i32);
|
|
|
|
StorageLive(_10);
|
|
|
|
_10 = _9;
|
|
|
|
_1 = (const 2_i32, move _10);
|
|
|
|
StorageDead(_10);
|
|
|
|
StorageDead(_9);
|
|
|
|
goto -> bb11;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2020-10-02 15:11:24 -05:00
|
|
|
bb4: {
|
2022-10-15 04:00:32 -05:00
|
|
|
FakeRead(ForMatchedPlace(None), _2);
|
2023-06-06 08:47:00 -05:00
|
|
|
unreachable;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2020-10-02 15:11:24 -05:00
|
|
|
bb5: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_6);
|
|
|
|
_6 = &((_2 as Some).0: i32);
|
2023-11-08 11:38:30 -06:00
|
|
|
_4 = &fake _2;
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_7);
|
|
|
|
_7 = guard() -> [return: bb6, unwind: bb12];
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2020-10-02 15:11:24 -05:00
|
|
|
bb6: {
|
2023-06-06 08:47:00 -05:00
|
|
|
switchInt(move _7) -> [0: bb8, otherwise: bb7];
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2020-10-02 15:11:24 -05:00
|
|
|
bb7: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_7);
|
|
|
|
FakeRead(ForMatchGuard, _4);
|
|
|
|
FakeRead(ForGuardBinding, _6);
|
|
|
|
StorageLive(_5);
|
|
|
|
_5 = ((_2 as Some).0: i32);
|
|
|
|
StorageLive(_8);
|
|
|
|
_8 = _5;
|
|
|
|
_1 = (const 1_i32, move _8);
|
|
|
|
StorageDead(_8);
|
|
|
|
StorageDead(_5);
|
|
|
|
StorageDead(_6);
|
|
|
|
goto -> bb11;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2020-10-02 15:11:24 -05:00
|
|
|
bb8: {
|
2023-06-06 08:47:00 -05:00
|
|
|
goto -> bb9;
|
2022-09-04 22:00:31 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb9: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_6);
|
|
|
|
falseEdge -> [real: bb3, imaginary: bb1];
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2022-09-04 22:00:31 -05:00
|
|
|
bb10: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_1 = (const 3_i32, const 3_i32);
|
|
|
|
goto -> bb11;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2022-09-04 22:00:31 -05:00
|
|
|
bb11: {
|
2023-06-06 08:47:00 -05:00
|
|
|
PlaceMention(_1);
|
|
|
|
StorageDead(_2);
|
|
|
|
StorageDead(_1);
|
|
|
|
_0 = const ();
|
|
|
|
return;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
2020-10-02 15:11:24 -05:00
|
|
|
|
2022-09-04 22:00:31 -05:00
|
|
|
bb12 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
resume;
|
2020-10-02 15:11:24 -05:00
|
|
|
}
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|