-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Description
enum Never {
}
fn foo(n: Never) {
match &n {
};
}
result is
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:
enum Never {
}
fn foo(n: Never) {
match n {
};
}
Metadata
Metadata
Assignees
Labels
No labels