You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0004]: non-exhaustive patterns: `_` not covered
--> /tmp/modmatch.rs:2:11
|
2 | match i % 3 {
| ^^^^^ pattern `_` not covered
This is easily covered with _ => unreachable!(), possibly the most idiomatic use of said macro. I just wonder if it's possible for rust to be a bit smarter about this type of case.
The text was updated successfully, but these errors were encountered:
This should be an RFC - this is a more general version of rust-lang/rfcs#1550. IIRC we already rejected it several times so you might want to look at the history of this proposal before writing one.
When matching on an unsigned modulus, I can cover all possible branches and still get a complaint.
This is easily covered with
_ => unreachable!()
, possibly the most idiomatic use of said macro. I just wonder if it's possible for rust to be a bit smarter about this type of case.The text was updated successfully, but these errors were encountered: