rust/src/test/run-pass/for-destruct.rs

6 lines
119 B
Rust
Raw Normal View History

2011-08-01 08:46:17 -05:00
fn main() {
for {x, y}: {x: int, y: int} in ~[{x: 10, y: 20}, {x: 30, y: 0}] {
assert x + y == 30;
}
}