2022-05-11 16:27:06 -05:00
|
|
|
- // MIR for `main` before Derefer
|
|
|
|
+ // MIR for `main` after Derefer
|
|
|
|
|
|
|
|
fn main() -> () {
|
2022-07-27 13:47:42 -05:00
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/derefer_inline_test.rs:+0:11: +0:11
|
|
|
|
let _1: std::boxed::Box<std::boxed::Box<u32>>; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
|
|
|
let mut _2: usize; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
|
|
|
let mut _3: usize; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
|
|
|
let mut _4: *mut u8; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
|
|
|
let mut _5: std::boxed::Box<std::boxed::Box<u32>>; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
2022-05-11 16:27:06 -05:00
|
|
|
scope 1 {
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageLive(_1); // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
|
|
|
_2 = SizeOf(std::boxed::Box<u32>); // scope 1 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
|
|
|
_3 = AlignOf(std::boxed::Box<u32>); // scope 1 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
|
|
|
_4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 1 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
2022-05-11 16:27:06 -05:00
|
|
|
// mir::Constant
|
2022-08-02 19:44:25 -05:00
|
|
|
// + span: $DIR/derefer_inline_test.rs:11:5: 11:12
|
2022-07-06 09:14:46 -05:00
|
|
|
// + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) }
|
2022-05-11 16:27:06 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageLive(_5); // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
|
|
|
_5 = ShallowInitBox(move _4, std::boxed::Box<u32>); // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
|
|
|
(*_5) = f() -> [return: bb2, unwind: bb6]; // scope 0 at $DIR/derefer_inline_test.rs:+1:9: +1:12
|
2022-05-11 16:27:06 -05:00
|
|
|
// mir::Constant
|
2022-08-02 19:44:25 -05:00
|
|
|
// + span: $DIR/derefer_inline_test.rs:11:9: 11:10
|
2022-07-06 09:14:46 -05:00
|
|
|
// + literal: Const { ty: fn() -> Box<u32> {f}, val: Value(<ZST>) }
|
2022-05-11 16:27:06 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2022-07-27 13:47:42 -05:00
|
|
|
_1 = move _5; // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
|
|
|
drop(_5) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/derefer_inline_test.rs:+1:11: +1:12
|
2022-05-11 16:27:06 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageDead(_5); // scope 0 at $DIR/derefer_inline_test.rs:+1:11: +1:12
|
|
|
|
drop(_1) -> bb4; // scope 0 at $DIR/derefer_inline_test.rs:+1:12: +1:13
|
2022-05-11 16:27:06 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageDead(_1); // scope 0 at $DIR/derefer_inline_test.rs:+1:12: +1:13
|
|
|
|
_0 = const (); // scope 0 at $DIR/derefer_inline_test.rs:+0:11: +2:2
|
|
|
|
return; // scope 0 at $DIR/derefer_inline_test.rs:+2:2: +2:2
|
2022-05-11 16:27:06 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb5 (cleanup): {
|
2022-07-27 13:47:42 -05:00
|
|
|
drop(_1) -> bb7; // scope 0 at $DIR/derefer_inline_test.rs:+1:12: +1:13
|
2022-05-11 16:27:06 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb6 (cleanup): {
|
2022-07-27 13:47:42 -05:00
|
|
|
drop(_5) -> bb7; // scope 0 at $DIR/derefer_inline_test.rs:+1:11: +1:12
|
2022-05-11 16:27:06 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb7 (cleanup): {
|
2022-07-27 13:47:42 -05:00
|
|
|
resume; // scope 0 at $DIR/derefer_inline_test.rs:+0:1: +2:2
|
2022-05-11 16:27:06 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|