|
| 1 | +- // MIR for `f` before Inline |
| 2 | ++ // MIR for `f` after Inline |
| 3 | + |
| 4 | + fn f(_1: impl Fn()) -> () { |
| 5 | + debug g => _1; // in scope 0 at $DIR/cycle.rs:3:6: 3:7 |
| 6 | + let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:3:20: 3:20 |
| 7 | + let _2: (); // in scope 0 at $DIR/cycle.rs:4:5: 4:8 |
| 8 | + let mut _3: &impl Fn(); // in scope 0 at $DIR/cycle.rs:4:5: 4:6 |
| 9 | + let mut _4: (); // in scope 0 at $DIR/cycle.rs:4:5: 4:8 |
| 10 | + |
| 11 | + bb0: { |
| 12 | + StorageLive(_2); // scope 0 at $DIR/cycle.rs:4:5: 4:8 |
| 13 | + StorageLive(_3); // scope 0 at $DIR/cycle.rs:4:5: 4:6 |
| 14 | + _3 = &_1; // scope 0 at $DIR/cycle.rs:4:5: 4:6 |
| 15 | + StorageLive(_4); // scope 0 at $DIR/cycle.rs:4:5: 4:8 |
| 16 | + _2 = <impl Fn() as Fn<()>>::call(move _3, move _4) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/cycle.rs:4:5: 4:8 |
| 17 | + // mir::Constant |
| 18 | + // + span: $DIR/cycle.rs:4:5: 4:6 |
| 19 | + // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl Fn(), ()) -> <impl Fn() as std::ops::FnOnce<()>>::Output {<impl Fn() as std::ops::Fn<()>>::call}, val: Value(Scalar(<ZST>)) } |
| 20 | + } |
| 21 | + |
| 22 | + bb1: { |
| 23 | + StorageDead(_4); // scope 0 at $DIR/cycle.rs:4:7: 4:8 |
| 24 | + StorageDead(_3); // scope 0 at $DIR/cycle.rs:4:7: 4:8 |
| 25 | + StorageDead(_2); // scope 0 at $DIR/cycle.rs:4:8: 4:9 |
| 26 | + _0 = const (); // scope 0 at $DIR/cycle.rs:3:20: 5:2 |
| 27 | + drop(_1) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/cycle.rs:5:1: 5:2 |
| 28 | + } |
| 29 | + |
| 30 | + bb2: { |
| 31 | + return; // scope 0 at $DIR/cycle.rs:5:2: 5:2 |
| 32 | + } |
| 33 | + |
| 34 | + bb3 (cleanup): { |
| 35 | + drop(_1) -> bb4; // scope 0 at $DIR/cycle.rs:5:1: 5:2 |
| 36 | + } |
| 37 | + |
| 38 | + bb4 (cleanup): { |
| 39 | + resume; // scope 0 at $DIR/cycle.rs:3:1: 5:2 |
| 40 | + } |
| 41 | + } |
| 42 | + |
0 commit comments