fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` before InstSimplify 2+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` after InstSimplify 3 4 fn <impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone(_1: &MyThing<T>) -> MyThing<T> { 5 debug self => _1; 6 let mut _0: MyThing<T>; 7 let mut _2: T; 8 let mut _3: &T; 9 let _4: &T; 10 let mut _5: u64; 11 let mut _6: &u64; 12 let _7: &u64; 13 let mut _8: [f32; 3]; 14 let mut _9: &[f32; 3]; 15 let _10: &[f32; 3]; 16 17 bb0: { 18 StorageLive(_2); 19 StorageLive(_3); 20 StorageLive(_4); 21 _4 = &((*_1).0: T); 22- _3 = &(*_4); 23+ _3 = _4; 24 _2 = <T as Clone>::clone(move _3) -> [return: bb1, unwind unreachable]; 25 } 26 27 bb1: { 28 StorageDead(_3); 29 StorageLive(_5); 30 StorageLive(_6); 31 StorageLive(_7); 32 _7 = &((*_1).1: u64); 33- _6 = &(*_7); 34- _5 = <u64 as Clone>::clone(move _6) -> [return: bb2, unwind unreachable]; 35+ _6 = _7; 36+ _5 = (*_6); 37+ goto -> bb2; 38 } 39 40 bb2: { 41 StorageDead(_6); 42 StorageLive(_8); 43 StorageLive(_9); 44 StorageLive(_10); 45 _10 = &((*_1).2: [f32; 3]); 46- _9 = &(*_10); 47- _8 = <[f32; 3] as Clone>::clone(move _9) -> [return: bb3, unwind unreachable]; 48+ _9 = _10; 49+ _8 = (*_9); 50+ goto -> bb3; 51 } 52 53 bb3: { 54 StorageDead(_9); 55 _0 = MyThing::<T> { v: move _2, i: move _5, a: move _8 }; 56 StorageDead(_8); 57 StorageDead(_5); 58 StorageDead(_2); 59 StorageDead(_10); 60 StorageDead(_7); 61 StorageDead(_4); 62 return; 63 } 64 } 65