mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
12 lines
296 B
Rust
12 lines
296 B
Rust
fn foo(a: Option<usize>, b: Option<usize>) {
|
|
match (a, b) {
|
|
//~^ ERROR: non-exhaustive patterns: `(None, None)` and `(Some(_), Some(_))` not covered
|
|
(Some(a), Some(b)) if a == b => {}
|
|
(Some(_), None) | (None, Some(_)) => {}
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
foo(None, None);
|
|
}
|