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: type &Never is non-empty
--> src/main.rs:5:11
|
5 | match &n {
| ^^
|
help: Please ensure that all possible cases are being handled; possibly adding wildcards or more match arms.
--> src/main.rs:5:11
|
5 | match &n {
| ^^
Rust 1.27.
I'm not 100% sure, but I guess this code should be valid, because following is valid:
Activity
scottmcm commentedon May 11, 2018
Personally I agree, but the "Fix the handling of uninhabited types in pattern matching" RFC was postponed: rust-lang/rfcs#1872
stepancheg commentedon May 11, 2018
OK, it is a know issue. Thank you @scottmcm!