2014-11-19 16:06:53 -06:00
|
|
|
use Foo::FooB;
|
2014-11-18 15:46:49 -06:00
|
|
|
|
2014-11-19 16:06:53 -06:00
|
|
|
enum Foo {
|
|
|
|
FooB { x: i32, y: i32 }
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2014-11-18 15:46:49 -06:00
|
|
|
let f = FooB { x: 3, y: 4 };
|
|
|
|
match f {
|
|
|
|
FooB(a, b) => println!("{} {}", a, b),
|
2022-10-25 11:15:15 -05:00
|
|
|
//~^ ERROR expected tuple struct or tuple variant, found variant `FooB`
|
2014-11-18 15:46:49 -06:00
|
|
|
}
|
|
|
|
}
|