rust/src/test/run-pass/for-destruct.rs
2011-08-01 17:52:43 +02:00

6 lines
119 B
Rust

fn main() {
for {x, y}: {x: int, y: int} in ~[{x: 10, y: 20}, {x: 30, y: 0}] {
assert x + y == 30;
}
}