15 lines
190 B
Rust
15 lines
190 B
Rust
|
enum A {
|
||
|
B { x: Option<int> },
|
||
|
C
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
let x = B { x: Some(3) };
|
||
|
match x { //~ ERROR non-exhaustive patterns
|
||
|
C => {}
|
||
|
B { x: None } => {}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|