|
| 1 | +// MIR for `forward` after built |
| 2 | + |
| 3 | +fn forward(_1: [usize], _2: usize) -> () { |
| 4 | + debug x => _1; // in scope 0 at $DIR/unsized_arg_forwarding.rs:+0:12: +0:17 |
| 5 | + debug i => _2; // in scope 0 at $DIR/unsized_arg_forwarding.rs:+0:28: +0:29 |
| 6 | + let mut _0: (); // return place in scope 0 at $DIR/unsized_arg_forwarding.rs:+0:38: +0:38 |
| 7 | + let _3: (); // in scope 0 at $DIR/unsized_arg_forwarding.rs:+4:5: +7:7 |
| 8 | + let mut _4: (); // in scope 0 at $DIR/unsized_arg_forwarding.rs:+4:12: +7:6 |
| 9 | + let mut _5: usize; // in scope 0 at $DIR/unsized_arg_forwarding.rs:+5:16: +5:17 |
| 10 | + let _6: usize; // in scope 0 at $DIR/unsized_arg_forwarding.rs:+5:11: +5:12 |
| 11 | + let mut _7: usize; // in scope 0 at $DIR/unsized_arg_forwarding.rs:+5:9: +5:13 |
| 12 | + let mut _8: bool; // in scope 0 at $DIR/unsized_arg_forwarding.rs:+5:9: +5:13 |
| 13 | + |
| 14 | + bb0: { |
| 15 | + StorageLive(_3); // scope 0 at $DIR/unsized_arg_forwarding.rs:+4:5: +7:7 |
| 16 | + StorageLive(_4); // scope 0 at $DIR/unsized_arg_forwarding.rs:+4:12: +7:6 |
| 17 | + StorageLive(_5); // scope 0 at $DIR/unsized_arg_forwarding.rs:+5:16: +5:17 |
| 18 | + _5 = _2; // scope 0 at $DIR/unsized_arg_forwarding.rs:+5:16: +5:17 |
| 19 | + StorageLive(_6); // scope 0 at $DIR/unsized_arg_forwarding.rs:+5:11: +5:12 |
| 20 | + _6 = _2; // scope 0 at $DIR/unsized_arg_forwarding.rs:+5:11: +5:12 |
| 21 | + _7 = Len(_1); // scope 0 at $DIR/unsized_arg_forwarding.rs:+5:9: +5:13 |
| 22 | + _8 = Lt(_6, _7); // scope 0 at $DIR/unsized_arg_forwarding.rs:+5:9: +5:13 |
| 23 | + assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> [success: bb1, unwind: bb3]; // scope 0 at $DIR/unsized_arg_forwarding.rs:+5:9: +5:13 |
| 24 | + } |
| 25 | + |
| 26 | + bb1: { |
| 27 | + _1[_6] = move _5; // scope 0 at $DIR/unsized_arg_forwarding.rs:+5:9: +5:17 |
| 28 | + StorageDead(_5); // scope 0 at $DIR/unsized_arg_forwarding.rs:+5:16: +5:17 |
| 29 | + StorageDead(_6); // scope 0 at $DIR/unsized_arg_forwarding.rs:+5:17: +5:18 |
| 30 | + _4 = (); // scope 0 at $DIR/unsized_arg_forwarding.rs:+6:9: +6:11 |
| 31 | + _3 = nop(move _1, move _4) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/unsized_arg_forwarding.rs:+4:5: +7:7 |
| 32 | + // mir::Constant |
| 33 | + // + span: $DIR/unsized_arg_forwarding.rs:10:5: 10:8 |
| 34 | + // + literal: Const { ty: fn([usize], ()) {nop}, val: Value(<ZST>) } |
| 35 | + } |
| 36 | + |
| 37 | + bb2: { |
| 38 | + StorageDead(_4); // scope 0 at $DIR/unsized_arg_forwarding.rs:+7:6: +7:7 |
| 39 | + StorageDead(_3); // scope 0 at $DIR/unsized_arg_forwarding.rs:+7:7: +7:8 |
| 40 | + _0 = const (); // scope 0 at $DIR/unsized_arg_forwarding.rs:+0:38: +8:2 |
| 41 | + return; // scope 0 at $DIR/unsized_arg_forwarding.rs:+8:2: +8:2 |
| 42 | + } |
| 43 | + |
| 44 | + bb3 (cleanup): { |
| 45 | + resume; // scope 0 at $DIR/unsized_arg_forwarding.rs:+0:1: +8:2 |
| 46 | + } |
| 47 | +} |
0 commit comments