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