mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
13 lines
199 B
Rust
13 lines
199 B
Rust
enum A {
|
|
B { x: Option<isize> },
|
|
C
|
|
}
|
|
|
|
fn main() {
|
|
let x = A::B { x: Some(3) };
|
|
match x { //~ ERROR non-exhaustive patterns
|
|
A::C => {}
|
|
A::B { x: None } => {}
|
|
}
|
|
}
|