2016-03-04 15:34:28 +02:00
|
|
|
enum Foo {
|
|
|
|
|
Bar(i32),
|
|
|
|
|
Baz
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
match Foo::Baz {
|
|
|
|
|
Foo::Bar => {}
|
2016-09-15 00:51:46 +03:00
|
|
|
//~^ ERROR expected unit struct/variant or constant, found tuple variant `Foo::Bar`
|
2016-03-04 15:34:28 +02:00
|
|
|
_ => {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
match S {
|
|
|
|
|
S(()) => {}
|
2016-09-15 00:51:46 +03:00
|
|
|
//~^ ERROR expected tuple struct/variant, found unit struct `S`
|
2016-03-04 15:34:28 +02:00
|
|
|
}
|
|
|
|
|
}
|