|
| 1 | +- // MIR for `caller` before Inline |
| 2 | ++ // MIR for `caller` after Inline |
| 3 | + |
| 4 | + fn caller(_1: Box<[i32]>) -> () { |
| 5 | + debug x => _1; // in scope 0 at $DIR/unsized_argument.rs:+0:11: +0:12 |
| 6 | + let mut _0: (); // return place in scope 0 at $DIR/unsized_argument.rs:+0:26: +0:26 |
| 7 | + let _2: (); // in scope 0 at $DIR/unsized_argument.rs:+1:5: +1:15 |
| 8 | + let mut _3: std::boxed::Box<[i32]>; // in scope 0 at $DIR/unsized_argument.rs:+1:13: +1:14 |
| 9 | + let mut _4: (); // in scope 0 at $DIR/unsized_argument.rs:+1:14: +1:15 |
| 10 | + let mut _5: (); // in scope 0 at $DIR/unsized_argument.rs:+1:14: +1:15 |
| 11 | + let mut _6: (); // in scope 0 at $DIR/unsized_argument.rs:+1:14: +1:15 |
| 12 | + let mut _7: *const [i32]; // in scope 0 at $DIR/unsized_argument.rs:+1:13: +1:14 |
| 13 | + |
| 14 | + bb0: { |
| 15 | + StorageLive(_2); // scope 0 at $DIR/unsized_argument.rs:+1:5: +1:15 |
| 16 | + StorageLive(_3); // scope 0 at $DIR/unsized_argument.rs:+1:13: +1:14 |
| 17 | + _3 = move _1; // scope 0 at $DIR/unsized_argument.rs:+1:13: +1:14 |
| 18 | + _7 = (((_3.0: std::ptr::Unique<[i32]>).0: std::ptr::NonNull<[i32]>).0: *const [i32]); // scope 0 at $DIR/unsized_argument.rs:+1:5: +1:15 |
| 19 | + _2 = callee(move (*_7)) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/unsized_argument.rs:+1:5: +1:15 |
| 20 | + // mir::Constant |
| 21 | + // + span: $DIR/unsized_argument.rs:9:5: 9:11 |
| 22 | + // + literal: Const { ty: fn([i32]) {callee}, val: Value(<ZST>) } |
| 23 | + } |
| 24 | + |
| 25 | + bb1: { |
| 26 | + StorageDead(_3); // scope 0 at $DIR/unsized_argument.rs:+1:14: +1:15 |
| 27 | + StorageDead(_2); // scope 0 at $DIR/unsized_argument.rs:+1:15: +1:16 |
| 28 | + _0 = const (); // scope 0 at $DIR/unsized_argument.rs:+0:26: +2:2 |
| 29 | + return; // scope 0 at $DIR/unsized_argument.rs:+2:2: +2:2 |
| 30 | + } |
| 31 | + |
| 32 | + bb2 (cleanup): { |
| 33 | + resume; // scope 0 at $DIR/unsized_argument.rs:+0:1: +2:2 |
| 34 | + } |
| 35 | + |
| 36 | + bb3: { |
| 37 | + _4 = alloc::alloc::box_free::<[i32], std::alloc::Global>(move (_3.0: std::ptr::Unique<[i32]>), move (_3.1: std::alloc::Global)) -> bb1; // scope 0 at $DIR/unsized_argument.rs:+1:14: +1:15 |
| 38 | + // mir::Constant |
| 39 | + // + span: $DIR/unsized_argument.rs:9:14: 9:15 |
| 40 | + // + literal: Const { ty: unsafe fn(Unique<[i32]>, std::alloc::Global) {alloc::alloc::box_free::<[i32], std::alloc::Global>}, val: Value(<ZST>) } |
| 41 | + } |
| 42 | + |
| 43 | + bb4 (cleanup): { |
| 44 | + _6 = alloc::alloc::box_free::<[i32], std::alloc::Global>(move (_3.0: std::ptr::Unique<[i32]>), move (_3.1: std::alloc::Global)) -> [return: bb2, unwind terminate]; // scope 0 at $DIR/unsized_argument.rs:+1:14: +1:15 |
| 45 | + // mir::Constant |
| 46 | + // + span: $DIR/unsized_argument.rs:9:14: 9:15 |
| 47 | + // + literal: Const { ty: unsafe fn(Unique<[i32]>, std::alloc::Global) {alloc::alloc::box_free::<[i32], std::alloc::Global>}, val: Value(<ZST>) } |
| 48 | + } |
| 49 | + } |
| 50 | + |
0 commit comments