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