]>
Commit | Line | Data |
---|---|---|
476ff2be SL |
1 | fn test(x: u32) -> u32 { |
2 | let y = x; | |
3 | y | |
a7813a04 XL |
4 | } |
5 | ||
abe05a73 XL |
6 | fn main() { |
7 | // Make sure the function actually gets instantiated. | |
8 | test(0); | |
9 | } | |
476ff2be SL |
10 | |
11 | // END RUST SOURCE | |
abe05a73 | 12 | // START rustc.test.CopyPropagation.before.mir |
476ff2be | 13 | // bb0: { |
abe05a73 | 14 | // ... |
8faf50e0 | 15 | // _2 = _1; |
abe05a73 | 16 | // ... |
8faf50e0 | 17 | // _0 = _2; |
abe05a73 | 18 | // ... |
476ff2be SL |
19 | // return; |
20 | // } | |
abe05a73 XL |
21 | // END rustc.test.CopyPropagation.before.mir |
22 | // START rustc.test.CopyPropagation.after.mir | |
476ff2be | 23 | // bb0: { |
abe05a73 | 24 | // ... |
8faf50e0 | 25 | // _0 = _1; |
abe05a73 | 26 | // ... |
476ff2be SL |
27 | // return; |
28 | // } | |
abe05a73 | 29 | // END rustc.test.CopyPropagation.after.mir |