rust/src/test/compile-fail/issue-2111.rs

11 lines
240 B
Rust
Raw Normal View History

2012-08-20 12:23:37 -07:00
fn foo(a: Option<uint>, b: Option<uint>) {
match (a,b) { //~ ERROR: non-exhaustive patterns: None not covered
(Some(a), Some(b)) if a == b => { }
(Some(_), None) |
(None, Some(_)) => { }
}
}
fn main() {
2012-08-20 12:23:37 -07:00
foo(None, None);
}