]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/struct-pattern-matching.rs
Merge pull request #3231 from killerswan/modes1
[rust.git] / src / test / run-pass / struct-pattern-matching.rs
1 struct Foo {
2     x: int;
3     y: int;
4 }
5
6 fn main() {
7     let a = Foo { x: 1, y: 2 };
8     match a {
9         Foo { x: x, y: y } => io::println(fmt!("yes, %d, %d", x, y))
10     }
11 }
12
13
14