1 #![deny(unreachable_patterns)]
4 pub enum NonExhaustiveEnum
{
23 pub enum EmptyNonExhaustiveEnum {}
25 fn empty_non_exhaustive(x
: EmptyNonExhaustiveEnum
) {
28 _
=> {}
//~ ERROR unreachable pattern
33 match NonExhaustiveEnum
::Unit {}
34 //~^ ERROR `NonExhaustiveEnum::Unit`, `NonExhaustiveEnum::Tuple(_)` and `NonExhaustiveEnum::Struct { .. }` not covered [E0004]
35 match NormalEnum
::Unit {}
36 //~^ ERROR `NormalEnum::Unit`, `NormalEnum::Tuple(_)` and `NormalEnum::Struct { .. }` not covered [E0004]