| - // MIR for `f` before Inline |
| + // MIR for `f` after Inline |
| |
| fn f(_1: impl Fn()) -> () { |
| debug g => _1; // in scope 0 at $DIR/cycle.rs:5:6: 5:7 |
| let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:5:20: 5:20 |
| let _2: (); // in scope 0 at $DIR/cycle.rs:6:5: 6:8 |
| let mut _3: &impl Fn(); // in scope 0 at $DIR/cycle.rs:6:5: 6:6 |
| let mut _4: (); // in scope 0 at $DIR/cycle.rs:6:5: 6:8 |
| |
| bb0: { |
| StorageLive(_2); // scope 0 at $DIR/cycle.rs:6:5: 6:8 |
| StorageLive(_3); // scope 0 at $DIR/cycle.rs:6:5: 6:6 |
| _3 = &_1; // scope 0 at $DIR/cycle.rs:6:5: 6:6 |
| StorageLive(_4); // scope 0 at $DIR/cycle.rs:6:5: 6:8 |
| _2 = <impl Fn() as Fn<()>>::call(move _3, move _4) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/cycle.rs:6:5: 6:8 |
| // mir::Constant |
| // + span: $DIR/cycle.rs:6:5: 6:6 |
| // + 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>)) } |
| } |
| |
| bb1: { |
| StorageDead(_4); // scope 0 at $DIR/cycle.rs:6:7: 6:8 |
| StorageDead(_3); // scope 0 at $DIR/cycle.rs:6:7: 6:8 |
| StorageDead(_2); // scope 0 at $DIR/cycle.rs:6:8: 6:9 |
| _0 = const (); // scope 0 at $DIR/cycle.rs:5:20: 7:2 |
| drop(_1) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/cycle.rs:7:1: 7:2 |
| } |
| |
| bb2: { |
| return; // scope 0 at $DIR/cycle.rs:7:2: 7:2 |
| } |
| |
| bb3 (cleanup): { |
| drop(_1) -> bb4; // scope 0 at $DIR/cycle.rs:7:1: 7:2 |
| } |
| |
| bb4 (cleanup): { |
| resume; // scope 0 at $DIR/cycle.rs:5:1: 7:2 |
| } |
| } |
| |