fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1- // MIR for `generic` before DataflowConstProp 2+ // MIR for `generic` after DataflowConstProp 3 4 fn generic() -> () { 5 let mut _0: (); 6 let _1: usize; 7 let mut _2: usize; 8 let mut _4: usize; 9 let mut _6: usize; 10 let mut _8: usize; 11 scope 1 { 12 debug gx => _1; 13 let _3: usize; 14 scope 2 { 15 debug gy => _3; 16 let _5: usize; 17 scope 3 { 18 debug dx => _5; 19 let _7: usize; 20 scope 4 { 21 debug dy => _7; 22 } 23 } 24 } 25 } 26 27 bb0: { 28 StorageLive(_1); 29 StorageLive(_2); 30 _2 = OffsetOf(Gamma<T>, [0]); 31 _1 = must_use::<usize>(move _2) -> [return: bb1, unwind continue]; 32 } 33 34 bb1: { 35 StorageDead(_2); 36 StorageLive(_3); 37 StorageLive(_4); 38 _4 = OffsetOf(Gamma<T>, [1]); 39 _3 = must_use::<usize>(move _4) -> [return: bb2, unwind continue]; 40 } 41 42 bb2: { 43 StorageDead(_4); 44 StorageLive(_5); 45 StorageLive(_6); 46- _6 = OffsetOf(Delta<T>, [1]); 47- _5 = must_use::<usize>(move _6) -> [return: bb3, unwind continue]; 48+ _6 = const 0_usize; 49+ _5 = must_use::<usize>(const 0_usize) -> [return: bb3, unwind continue]; 50 } 51 52 bb3: { 53 StorageDead(_6); 54 StorageLive(_7); 55 StorageLive(_8); 56- _8 = OffsetOf(Delta<T>, [2]); 57- _7 = must_use::<usize>(move _8) -> [return: bb4, unwind continue]; 58+ _8 = const 2_usize; 59+ _7 = must_use::<usize>(const 2_usize) -> [return: bb4, unwind continue]; 60 } 61 62 bb4: { 63 StorageDead(_8); 64 _0 = const (); 65 StorageDead(_7); 66 StorageDead(_5); 67 StorageDead(_3); 68 StorageDead(_1); 69 return; 70 } 71 } 72