check_match: unify check_irrefutable & check_exhaustive more.

This commit is contained in:
Mazdak Farrokhzad
2019-09-09 16:44:06 +02:00
parent b36a206a30
commit 7d4665b097
19 changed files with 135 additions and 95 deletions

View File

@@ -1,7 +1,9 @@
// ignore-line-length
fn func((1, (Some(1), 2..=3)): (isize, (Option<isize>, isize))) { }
//~^ 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: `(std::i32::MIN..=0i32, _)` not covered
//~^ ERROR refutable pattern in local binding: `(std::i32::MIN..=0i32, _)` and `(2i32..=std::i32::MAX, _)` not covered
}