Files
rust/tests/ui/pattern/unit-variant-pattern-matching-29383.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
360 B
Rust
Raw Normal View History

2025-07-13 16:39:45 -04:00
// 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`
}
}