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