summary refs log tree commit diff
path: root/src/test/run-pass/unique-assign-copy.rs
blob: 2c152c9805ca53a7a9b0a89a52efa25963015040 (plain)
1
2
3
4
5
6
7
8
9
10
fn main() {
    let i = ~mut 1;
    // Should be a copy
    let mut j;
    j = i;
    *i = 2;
    *j = 3;
    assert *i == 2;
    assert *j == 3;
}