rust/src/test/run-pass/for-implicit-copy.rs
2011-09-13 13:05:59 +02:00

9 lines
159 B
Rust

fn main() {
let x = [@{mutable a: @10, b: @20}];
for @{a, b} in x {
assert *a == 10;
(*x[0]).a = @30;
assert *a == 10;
}
}