mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
14 lines
252 B
Rust
14 lines
252 B
Rust
use Foo::FooB;
|
|
|
|
enum Foo {
|
|
FooB { x: i32, y: i32 }
|
|
}
|
|
|
|
fn main() {
|
|
let f = FooB { x: 3, y: 4 };
|
|
match f {
|
|
FooB(a, b) => println!("{} {}", a, b),
|
|
//~^ ERROR expected tuple struct or tuple variant, found variant `FooB`
|
|
}
|
|
}
|