fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1- // MIR for `h` before Inline 2+ // MIR for `h` after Inline 3 4 fn h() -> () { 5 let mut _0: (); 6 let _1: (!, !); 7+ let mut _2: fn() -> ! {sleep}; 8+ scope 1 (inlined call_twice::<!, fn() -> ! {sleep}>) { 9+ debug f => _2; 10+ let mut _3: &fn() -> ! {sleep}; 11+ let _4: !; 12+ let mut _5: &fn() -> ! {sleep}; 13+ let mut _6: !; 14+ let mut _7: !; 15+ scope 2 { 16+ debug a => _4; 17+ scope 3 { 18+ debug b => _6; 19+ } 20+ } 21+ } 22 23 bb0: { 24 StorageLive(_1); 25- _1 = call_twice::<!, fn() -> ! {sleep}>(sleep) -> unwind continue; 26+ StorageLive(_2); 27+ _2 = sleep; 28+ StorageLive(_6); 29+ StorageLive(_4); 30+ StorageLive(_3); 31+ _3 = &_2; 32+ _4 = <fn() -> ! {sleep} as Fn<()>>::call(move _3, const ()) -> [return: bb1, unwind: bb5]; 33+ } 34+ 35+ bb1: { 36+ StorageDead(_3); 37+ StorageLive(_5); 38+ _5 = &_2; 39+ _6 = <fn() -> ! {sleep} as Fn<()>>::call(move _5, const ()) -> [return: bb2, unwind: bb4]; 40+ } 41+ 42+ bb2: { 43+ StorageDead(_5); 44+ StorageLive(_7); 45+ _7 = move _4; 46+ _1 = (move _7, move _6); 47+ StorageDead(_7); 48+ StorageDead(_4); 49+ drop(_2) -> [return: bb3, unwind continue]; 50+ } 51+ 52+ bb3: { 53+ unreachable; 54+ } 55+ 56+ bb4 (cleanup): { 57+ drop(_4) -> [return: bb5, unwind terminate(cleanup)]; 58+ } 59+ 60+ bb5 (cleanup): { 61+ drop(_2) -> [return: bb6, unwind terminate(cleanup)]; 62+ } 63+ 64+ bb6 (cleanup): { 65+ resume; 66 } 67 } 68