fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1- // MIR for `main` before ElaborateDrops 2+ // MIR for `main` after ElaborateDrops 3 4 fn main() -> () { 5 let mut _0: (); 6 let _1: (); 7 let mut _2: S; 8 let mut _3: S; 9 let mut _4: S; 10+ let mut _5: bool; 11 scope 1 { 12 debug x => _1; 13 } 14 15 bb0: { 16+ _5 = const false; 17 StorageLive(_1); 18 StorageLive(_2); 19+ _5 = const true; 20 _2 = S; 21 StorageLive(_3); 22 StorageLive(_4); 23 _4 = S; 24 _3 = S::id(move _4) -> [return: bb1, unwind: bb4]; 25 } 26 27 bb1: { 28 StorageDead(_4); 29+ _5 = const false; 30 _1 = S::other(move _2, move _3) -> [return: bb2, unwind: bb3]; 31 } 32 33 bb2: { 34 StorageDead(_3); 35+ _5 = const false; 36 StorageDead(_2); 37 _0 = const (); 38 StorageDead(_1); 39 return; 40 } 41 42 bb3 (cleanup): { 43- drop(_3) -> [return: bb5, unwind terminate(cleanup)]; 44+ goto -> bb5; 45 } 46 47 bb4 (cleanup): { 48- drop(_4) -> [return: bb5, unwind terminate(cleanup)]; 49+ goto -> bb5; 50 } 51 52 bb5 (cleanup): { 53- drop(_2) -> [return: bb6, unwind terminate(cleanup)]; 54+ goto -> bb8; 55 } 56 57 bb6 (cleanup): { 58 resume; 59+ } 60+ 61+ bb7 (cleanup): { 62+ drop(_2) -> [return: bb6, unwind terminate(cleanup)]; 63+ } 64+ 65+ bb8 (cleanup): { 66+ switchInt(_5) -> [0: bb6, otherwise: bb7]; 67 } 68 } 69