rust/src/test/compile-fail/issue-2111.rs
Tim Chevalier b8710de5ff Add test cases
issue-912 is xfailed. issue-2111 is already fixed, but it's good to
have the test case.
2012-06-21 19:58:52 -07:00

11 lines
232 B
Rust

fn foo(a: option<uint>, b: option<uint>) {
alt (a,b) { //! ERROR: non-exhaustive patterns: none not covered
(some(a), some(b)) if a == b { }
(some(_), none) |
(none, some(_)) { }
}
}
fn main() {
foo(none, none);
}