rust/src/test/ui/issues/issue-32004.rs
2018-12-25 21:08:33 -07:00

20 lines
332 B
Rust

enum Foo {
Bar(i32),
Baz
}
struct S;
fn main() {
match Foo::Baz {
Foo::Bar => {}
//~^ ERROR expected unit struct/variant or constant, found tuple variant `Foo::Bar`
_ => {}
}
match S {
S(()) => {}
//~^ ERROR expected tuple struct/variant, found unit struct `S`
}
}