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
--> src/main.rs:2:11
|
2 | match 42u32 {
| ^^^^^ pattern `_` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type `u32`
However this one with ranges compiles fine:
fnmain(){match42u32{
x @ 0..=std::u32::MAX => dbg!(x)};}
I would expect x @ 0..=std::u32::MAX and x if x >= 0 be equal in match arms.
The text was updated successfully, but these errors were encountered:
I tried this code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b57dd6cc254167f09d1a51f753ddebb6
Gives error:
However this one with ranges compiles fine:
I would expect
x @ 0..=std::u32::MAX
andx if x >= 0
be equal in match arms.The text was updated successfully, but these errors were encountered: