fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1- // MIR for `g` before Inline 2+ // MIR for `g` after Inline 3 4 fn g() -> () { 5 let mut _0: (); 6 let _1: (); 7+ let mut _2: fn() {main}; 8+ scope 1 (inlined f::<fn() {main}>) { 9+ debug g => _2; 10+ let mut _3: &fn() {main}; 11+ let _4: (); 12+ } 13 14 bb0: { 15 StorageLive(_1); 16- _1 = f::<fn() {main}>(main) -> [return: bb1, unwind continue]; 17+ StorageLive(_2); 18+ _2 = main; 19+ StorageLive(_4); 20+ StorageLive(_3); 21+ _3 = &_2; 22+ _4 = <fn() {main} as Fn<()>>::call(move _3, const ()) -> [return: bb2, unwind: bb3]; 23 } 24 25 bb1: { 26+ StorageDead(_4); 27+ StorageDead(_2); 28 StorageDead(_1); 29 _0 = const (); 30 return; 31+ } 32+ 33+ bb2: { 34+ StorageDead(_3); 35+ drop(_2) -> [return: bb1, unwind continue]; 36+ } 37+ 38+ bb3 (cleanup): { 39+ drop(_2) -> [return: bb4, unwind terminate(cleanup)]; 40+ } 41+ 42+ bb4 (cleanup): { 43+ resume; 44 } 45 } 46