diff options
Diffstat (limited to 'tests/ui/pattern/unit-variant-pattern-matching-29383.rs')
| -rw-r--r-- | tests/ui/pattern/unit-variant-pattern-matching-29383.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/pattern/unit-variant-pattern-matching-29383.rs b/tests/ui/pattern/unit-variant-pattern-matching-29383.rs new file mode 100644 index 00000000000..e339dc01f46 --- /dev/null +++ b/tests/ui/pattern/unit-variant-pattern-matching-29383.rs @@ -0,0 +1,15 @@ +// https://github.com/rust-lang/rust/issues/29383 +enum E { + A, + B, +} + +fn main() { + match None { + None => {} + Some(E::A(..)) => {} + //~^ ERROR expected tuple struct or tuple variant, found unit variant `E::A` + Some(E::B(..)) => {} + //~^ ERROR expected tuple struct or tuple variant, found unit variant `E::B` + } +} |
