2011-09-22 15:22:53 -05:00
|
|
|
fn main() {
|
2012-03-26 20:35:18 -05:00
|
|
|
let i = ~mut 1;
|
2011-09-22 15:22:53 -05:00
|
|
|
// Should be a copy
|
2012-12-05 19:36:51 -06:00
|
|
|
let j = copy i;
|
2011-09-22 15:22:53 -05:00
|
|
|
*i = 2;
|
|
|
|
*j = 3;
|
|
|
|
assert *i == 2;
|
|
|
|
assert *j == 3;
|
2012-12-05 19:36:51 -06:00
|
|
|
}
|