fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// MIR for `droppy` after built 2 3fn droppy() -> () { 4 let mut _0: (); 5 let _1: (); 6 let _2: Droppy; 7 let _4: Droppy; 8 let mut _5: isize; 9 let mut _6: u8; 10 let mut _7: bool; 11 let _8: Droppy; 12 scope 1 { 13 debug x => _2; 14 scope 2 { 15 debug y => _3; 16 } 17 scope 3 { 18 let _3: usize; 19 } 20 } 21 scope 4 { 22 debug z => _8; 23 } 24 25 bb0: { 26 StorageLive(_1); 27 StorageLive(_2); 28 _2 = Droppy::C; 29 FakeRead(ForLet(None), _2); 30 StorageLive(_3); 31 StorageLive(_4); 32 _4 = move _2; 33 _5 = discriminant(_4); 34 _6 = _5 as u8 (IntToInt); 35 _7 = Le(_6, const 2_u8); 36 assume(move _7); 37 _3 = move _5 as usize (IntToInt); 38 drop(_4) -> [return: bb1, unwind: bb4]; 39 } 40 41 bb1: { 42 StorageDead(_4); 43 FakeRead(ForLet(None), _3); 44 _1 = const (); 45 StorageDead(_3); 46 drop(_2) -> [return: bb2, unwind: bb5]; 47 } 48 49 bb2: { 50 StorageDead(_2); 51 StorageDead(_1); 52 StorageLive(_8); 53 _8 = Droppy::B; 54 FakeRead(ForLet(None), _8); 55 _0 = const (); 56 drop(_8) -> [return: bb3, unwind: bb5]; 57 } 58 59 bb3: { 60 StorageDead(_8); 61 return; 62 } 63 64 bb4 (cleanup): { 65 drop(_2) -> [return: bb5, unwind terminate(cleanup)]; 66 } 67 68 bb5 (cleanup): { 69 resume; 70 } 71}