|
| 1 | +- // MIR for `main` before CopyProp |
| 2 | ++ // MIR for `main` after CopyProp |
| 3 | + |
| 4 | + fn main() -> () { |
| 5 | + let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:+0:11: +0:11 |
| 6 | + let mut _1: i32; // in scope 0 at $DIR/cycle.rs:+1:9: +1:14 |
| 7 | + let mut _4: i32; // in scope 0 at $DIR/cycle.rs:+4:9: +4:10 |
| 8 | + let _5: (); // in scope 0 at $DIR/cycle.rs:+6:5: +6:12 |
| 9 | + let mut _6: i32; // in scope 0 at $DIR/cycle.rs:+6:10: +6:11 |
| 10 | + scope 1 { |
| 11 | + debug x => _1; // in scope 1 at $DIR/cycle.rs:+1:9: +1:14 |
| 12 | + let _2: i32; // in scope 1 at $DIR/cycle.rs:+2:9: +2:10 |
| 13 | + scope 2 { |
| 14 | + debug y => _2; // in scope 2 at $DIR/cycle.rs:+2:9: +2:10 |
| 15 | + let _3: i32; // in scope 2 at $DIR/cycle.rs:+3:9: +3:10 |
| 16 | + scope 3 { |
| 17 | +- debug z => _3; // in scope 3 at $DIR/cycle.rs:+3:9: +3:10 |
| 18 | ++ debug z => _2; // in scope 3 at $DIR/cycle.rs:+3:9: +3:10 |
| 19 | + } |
| 20 | + } |
| 21 | + } |
| 22 | + |
| 23 | + bb0: { |
| 24 | + StorageLive(_1); // scope 0 at $DIR/cycle.rs:+1:9: +1:14 |
| 25 | + _1 = val() -> bb1; // scope 0 at $DIR/cycle.rs:+1:17: +1:22 |
| 26 | + // mir::Constant |
| 27 | + // + span: $DIR/cycle.rs:9:17: 9:20 |
| 28 | + // + literal: Const { ty: fn() -> i32 {val}, val: Value(<ZST>) } |
| 29 | + } |
| 30 | + |
| 31 | + bb1: { |
| 32 | +- StorageLive(_2); // scope 1 at $DIR/cycle.rs:+2:9: +2:10 |
| 33 | + _2 = _1; // scope 1 at $DIR/cycle.rs:+2:13: +2:14 |
| 34 | +- StorageLive(_3); // scope 2 at $DIR/cycle.rs:+3:9: +3:10 |
| 35 | +- _3 = _2; // scope 2 at $DIR/cycle.rs:+3:13: +3:14 |
| 36 | +- StorageLive(_4); // scope 3 at $DIR/cycle.rs:+4:9: +4:10 |
| 37 | +- _4 = _3; // scope 3 at $DIR/cycle.rs:+4:9: +4:10 |
| 38 | +- _1 = move _4; // scope 3 at $DIR/cycle.rs:+4:5: +4:10 |
| 39 | +- StorageDead(_4); // scope 3 at $DIR/cycle.rs:+4:9: +4:10 |
| 40 | ++ _1 = _2; // scope 3 at $DIR/cycle.rs:+4:5: +4:10 |
| 41 | + StorageLive(_5); // scope 3 at $DIR/cycle.rs:+6:5: +6:12 |
| 42 | + StorageLive(_6); // scope 3 at $DIR/cycle.rs:+6:10: +6:11 |
| 43 | + _6 = _1; // scope 3 at $DIR/cycle.rs:+6:10: +6:11 |
| 44 | + _5 = std::mem::drop::<i32>(move _6) -> bb2; // scope 3 at $DIR/cycle.rs:+6:5: +6:12 |
| 45 | + // mir::Constant |
| 46 | + // + span: $DIR/cycle.rs:14:5: 14:9 |
| 47 | + // + literal: Const { ty: fn(i32) {std::mem::drop::<i32>}, val: Value(<ZST>) } |
| 48 | + } |
| 49 | + |
| 50 | + bb2: { |
| 51 | + StorageDead(_6); // scope 3 at $DIR/cycle.rs:+6:11: +6:12 |
| 52 | + StorageDead(_5); // scope 3 at $DIR/cycle.rs:+6:12: +6:13 |
| 53 | + _0 = const (); // scope 0 at $DIR/cycle.rs:+0:11: +7:2 |
| 54 | +- StorageDead(_3); // scope 2 at $DIR/cycle.rs:+7:1: +7:2 |
| 55 | +- StorageDead(_2); // scope 1 at $DIR/cycle.rs:+7:1: +7:2 |
| 56 | + StorageDead(_1); // scope 0 at $DIR/cycle.rs:+7:1: +7:2 |
| 57 | + return; // scope 0 at $DIR/cycle.rs:+7:2: +7:2 |
| 58 | + } |
| 59 | + } |
| 60 | + |
0 commit comments