2022-09-04 22:00:31 -05:00
|
|
|
// MIR for `droppy` after built
|
2022-06-29 09:18:55 -05:00
|
|
|
|
|
|
|
fn droppy() -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
let mut _0: ();
|
|
|
|
let _1: ();
|
|
|
|
let _2: Droppy;
|
|
|
|
let _4: Droppy;
|
|
|
|
let mut _5: isize;
|
|
|
|
let mut _6: u8;
|
|
|
|
let mut _7: bool;
|
|
|
|
let _8: Droppy;
|
2022-06-29 09:18:55 -05:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug x => _2;
|
2022-06-29 09:18:55 -05:00
|
|
|
scope 2 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug y => _3;
|
2022-06-29 09:18:55 -05:00
|
|
|
}
|
|
|
|
scope 3 {
|
2023-06-06 08:47:00 -05:00
|
|
|
let _3: usize;
|
2022-06-29 09:18:55 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
scope 4 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug z => _8;
|
2022-06-29 09:18:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_1);
|
|
|
|
StorageLive(_2);
|
|
|
|
_2 = Droppy::C;
|
|
|
|
FakeRead(ForLet(None), _2);
|
|
|
|
StorageLive(_3);
|
|
|
|
StorageLive(_4);
|
|
|
|
_4 = move _2;
|
|
|
|
_5 = discriminant(_4);
|
|
|
|
_6 = _5 as u8 (IntToInt);
|
|
|
|
_7 = Le(_6, const 2_u8);
|
|
|
|
assume(move _7);
|
|
|
|
_3 = move _5 as usize (IntToInt);
|
|
|
|
drop(_4) -> [return: bb1, unwind: bb4];
|
2022-10-13 11:24:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_4);
|
|
|
|
FakeRead(ForLet(None), _3);
|
|
|
|
_1 = const ();
|
|
|
|
StorageDead(_3);
|
|
|
|
drop(_2) -> [return: bb2, unwind: bb5];
|
2022-06-29 09:18:55 -05:00
|
|
|
}
|
|
|
|
|
2022-10-13 11:24:27 -05:00
|
|
|
bb2: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_2);
|
|
|
|
StorageDead(_1);
|
|
|
|
StorageLive(_8);
|
|
|
|
_8 = Droppy::B;
|
|
|
|
FakeRead(ForLet(None), _8);
|
|
|
|
_0 = const ();
|
|
|
|
drop(_8) -> [return: bb3, unwind: bb5];
|
2022-06-29 09:18:55 -05:00
|
|
|
}
|
|
|
|
|
2022-10-13 11:24:27 -05:00
|
|
|
bb3: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_8);
|
|
|
|
return;
|
2022-06-29 09:18:55 -05:00
|
|
|
}
|
|
|
|
|
2022-10-13 11:24:27 -05:00
|
|
|
bb4 (cleanup): {
|
2023-08-21 02:57:10 -05:00
|
|
|
drop(_2) -> [return: bb5, unwind terminate (panic in a destructor during cleanup)];
|
2022-10-13 11:24:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb5 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
resume;
|
2022-06-29 09:18:55 -05:00
|
|
|
}
|
|
|
|
}
|