Closed
Description
This simple code fails to compile because Other
is not defined. But the error message is unreachable pattern [E0001]
Bar => "bar"
. But Bar
is not the cause it just happens to occur after Other
.
enum Foobar {
Foo,
Bar,
}
fn main() {
use Foobar::*;
let x = Foo;
println!("{}", match x {
Foo => "foo",
Other => "other",
Bar => "bar",
});
}