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

6 lines
126 B
Rust
Raw Normal View History

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