1
Fork 0

Migrate pattern matching

This commit is contained in:
mejrs 2022-12-23 21:02:23 +01:00 committed by David Tolnay
parent ef33072890
commit 31c20210b9
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
35 changed files with 417 additions and 326 deletions

View file

@ -1,4 +1,4 @@
error[E0005]: refutable pattern in function argument: `(_, _)` not covered
error[E0005]: refutable pattern in function argument
--> $DIR/refutable-pattern-errors.rs:1:9
|
LL | fn func((1, (Some(1), 2..=3)): (isize, (Option<isize>, isize))) { }
@ -6,8 +6,8 @@ LL | fn func((1, (Some(1), 2..=3)): (isize, (Option<isize>, isize))) { }
|
= note: the matched value is of type `(isize, (Option<isize>, isize))`
error[E0005]: refutable pattern in local binding: `(i32::MIN..=0_i32, _)` and `(2_i32..=i32::MAX, _)` not covered
--> $DIR/refutable-pattern-errors.rs:5:9
error[E0005]: refutable pattern in local binding
--> $DIR/refutable-pattern-errors.rs:6:9
|
LL | let (1, (Some(1), 2..=3)) = (1, (None, 2));
| ^^^^^^^^^^^^^^^^^^^^^ patterns `(i32::MIN..=0_i32, _)` and `(2_i32..=i32::MAX, _)` not covered