Closed
Description
We got the following warning message:
warning: variant is never used: `Foo`, #[warn(dead_code)] on by default
For this code:
enum Something {
Foo,
NotFoo
}
fn main() {
match Something::NotFoo {
Something::Foo => {}
_ => {}
}
}
This warning could mislead users because for them, the Foo variant is used. Adding a specific warning message could be nice.
@eddyb proposed this message instead in this case:
"this variant is never instantiated"
cc @eddyb