summary refs log tree commit diff
path: root/src/test/run-pass/for-implicit-copy.rs
blob: 572556370a7a26bd52ef4f6484f0cbc6d467ad45 (plain)
1
2
3
4
5
6
7
8
fn main() {
    let x = [@{mut a: @10, b: @20}];
    for @{a, b} in x {
        assert *a == 10;
        (*x[0]).a = @30;
        assert *a == 10;
    }
}