Add test cases
issue-912 is xfailed. issue-2111 is already fixed, but it's good to have the test case.
This commit is contained in:
parent
be8a08b2af
commit
b8710de5ff
2 changed files with 19 additions and 0 deletions
11
src/test/compile-fail/issue-2111.rs
Normal file
11
src/test/compile-fail/issue-2111.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue