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