2015-01-08 22:02:42 +11:00
|
|
|
fn foo(a: Option<usize>, b: Option<usize>) {
|
2020-12-17 00:42:49 +00:00
|
|
|
match (a, b) {
|
2020-12-17 01:18:01 +00:00
|
|
|
//~^ ERROR: non-exhaustive patterns: `(None, None)` and `(Some(_), Some(_))` not covered
|
2020-12-17 00:42:49 +00:00
|
|
|
(Some(a), Some(b)) if a == b => {}
|
|
|
|
(Some(_), None) | (None, Some(_)) => {}
|
|
|
|
}
|
2012-06-21 19:58:52 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2020-12-17 00:42:49 +00:00
|
|
|
foo(None, None);
|
2013-02-14 11:47:00 -08:00
|
|
|
}
|