Closed
Description
The problem is, of course, as follows:
import names::{Alice, Bob};
...
match name {
Alice => ...,
Bob => ...,
Carol => ..., // <- treated as a variable because of forgotten import
_ => ..., //~ WARNING unreachable pattern
}
or:
match name {
Alice => ...,
Bob | Carol => ..., //~ ERROR variable Carol not bound in all patterns
}
We should be able to emit a hint that says something like Maybe you forgot to import
Carol?
.