rust/src/test/ui/issues/issue-2111.rs
2018-12-25 21:08:33 -07:00

13 lines
256 B
Rust

fn foo(a: Option<usize>, b: Option<usize>) {
match (a,b) {
//~^ ERROR: non-exhaustive patterns: `(None, None)` not covered
(Some(a), Some(b)) if a == b => { }
(Some(_), None) |
(None, Some(_)) => { }
}
}
fn main() {
foo(None, None);
}