2019-03-26 17:36:07 -07:00
|
|
|
enum Enum {
|
|
|
|
Foo { a: usize, b: usize },
|
|
|
|
Bar(usize, usize),
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x = Enum::Foo(a: 3, b: 4);
|
2021-09-07 17:45:16 +00:00
|
|
|
//~^ ERROR invalid `struct` delimiters or `fn` call arguments
|
2019-03-26 17:36:07 -07:00
|
|
|
match x {
|
|
|
|
Enum::Foo(a, b) => {}
|
2019-10-14 17:20:50 -07:00
|
|
|
//~^ ERROR expected tuple struct or tuple variant, found struct variant `Enum::Foo`
|
2020-08-09 17:52:29 -07:00
|
|
|
Enum::Bar { a, b } => {}
|
|
|
|
//~^ ERROR tuple variant `Enum::Bar` written as struct variant
|
2019-03-26 17:36:07 -07:00
|
|
|
}
|
|
|
|
}
|