Provide a witness pattern for non-exhaustive patterns

Fixed #4321
This commit is contained in:
Jakub Wieczorek
2014-06-07 14:17:01 +02:00
parent f5e513b2b2
commit 34407dcdbb
7 changed files with 502 additions and 552 deletions

View File

@@ -10,9 +10,9 @@
fn func((1, (Some(1), 2..3)): (int, (Option<int>, int))) { }
//~^ ERROR refutable pattern in function argument
//~^ ERROR refutable pattern in function argument: (_, _) not covered
fn main() {
let (1, (Some(1), 2..3)) = (1, (None, 2));
//~^ ERROR refutable pattern in local binding
//~^ ERROR refutable pattern in local binding: (_, _) not covered
}