2020-04-02 16:09:01 -05:00
|
|
|
// MIR for `main` before ElaborateDrops
|
|
|
|
|
|
|
|
fn main() -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
let mut _0: ();
|
|
|
|
let _1: std::boxed::Box<S>;
|
|
|
|
let mut _2: usize;
|
|
|
|
let mut _3: usize;
|
|
|
|
let mut _4: *mut u8;
|
|
|
|
let mut _5: std::boxed::Box<S>;
|
|
|
|
let _6: ();
|
|
|
|
let mut _7: std::boxed::Box<S>;
|
2020-04-02 16:09:01 -05:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug x => _1;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
2021-09-16 17:04:02 -05:00
|
|
|
scope 2 {
|
|
|
|
}
|
2020-04-02 16:09:01 -05:00
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_1);
|
|
|
|
_2 = SizeOf(S);
|
|
|
|
_3 = AlignOf(S);
|
2023-06-23 11:53:09 -05:00
|
|
|
_4 = alloc::alloc::exchange_malloc(move _2, move _3) -> [return: bb1, unwind continue];
|
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
|
|
|
StorageLive(_5);
|
|
|
|
_5 = ShallowInitBox(move _4, S);
|
|
|
|
(*_5) = S::new() -> [return: bb2, unwind: bb8];
|
2021-01-21 21:38:58 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_1 = move _5;
|
2023-06-23 11:53:09 -05:00
|
|
|
drop(_5) -> [return: bb3, unwind continue];
|
2021-09-16 17:04:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_5);
|
|
|
|
StorageLive(_6);
|
|
|
|
StorageLive(_7);
|
|
|
|
_7 = move _1;
|
|
|
|
_6 = std::mem::drop::<Box<S>>(move _7) -> [return: bb4, unwind: bb6];
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2021-09-16 17:04:02 -05:00
|
|
|
bb4: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_6);
|
|
|
|
_0 = const ();
|
2023-06-23 11:53:09 -05:00
|
|
|
drop(_1) -> [return: bb5, unwind continue];
|
2020-10-02 15:11:24 -05:00
|
|
|
}
|
|
|
|
|
2021-09-16 17:04:02 -05:00
|
|
|
bb5: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_1);
|
|
|
|
return;
|
2020-10-02 15:11:24 -05:00
|
|
|
}
|
|
|
|
|
2020-10-24 05:18:32 -05:00
|
|
|
bb6 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
drop(_7) -> [return: bb7, unwind terminate];
|
2021-01-21 21:38:58 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb7 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
drop(_1) -> [return: bb9, unwind terminate];
|
2021-01-21 21:44:02 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb8 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
drop(_5) -> [return: bb9, unwind terminate];
|
2021-09-16 17:04:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb9 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
resume;
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
}
|