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