rust/src/test/run-pass/for-implicit-copy.rs

9 lines
159 B
Rust
Raw Normal View History

2011-09-13 05:31:16 -05:00
fn main() {
let x = [@{mutable a: @10, b: @20}];
for @{a, b} in x {
assert *a == 10;
(*x[0]).a = @30;
assert *a == 10;
}
}