mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 12:07:40 +00:00
12 lines
206 B
Rust
12 lines
206 B
Rust
![]() |
struct Foo(int, int);
|
||
|
|
||
|
fn main() {
|
||
|
let x = Foo(1, 2);
|
||
|
match x { //~ ERROR non-exhaustive
|
||
|
Foo(1, b) => io::println(fmt!("%d", b)),
|
||
|
Foo(2, b) => io::println(fmt!("%d", b))
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|