1- // MIR for `bar` before Inline 2+ // MIR for `bar` after Inline 3 4 fn bar(_1: P) -> () { 5 debug _baz => _1; 6 let mut _0: (); 7 let _2: (); 8 let mut _3: &fn() {foo}; 9 let _4: fn() {foo}; 10 let mut _5: (); 11+ scope 1 (inlined <fn() {foo} as Fn<()>>::call - shim(fn() {foo})) { 12+ } 13 14 bb0: { 15 StorageLive(_2); 16 StorageLive(_3); 17 StorageLive(_4); 18 _4 = hide_foo() -> [return: bb1, unwind unreachable]; 19 } 20 21 bb1: { 22 _3 = &_4; 23 StorageLive(_5); 24 _5 = (); 25- _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind unreachable]; 26+ _2 = move (*_3)() -> [return: bb3, unwind unreachable]; 27 } 28 29 bb2: { 30+ return; 31+ } 32+ 33+ bb3: { 34 StorageDead(_5); 35 StorageDead(_3); 36 StorageDead(_4); 37 StorageDead(_2); 38 _0 = const (); 39- drop(_1) -> [return: bb3, unwind unreachable]; 40- } 41- 42- bb3: { 43- return; 44+ drop(_1) -> [return: bb2, unwind unreachable]; 45 } 46 } 47 48