Closed
Description
If I define the following types
enum Three {
A,
B,
C,
}
enum Two {
A,
B,
}
enum One {
A,
}
enum Zero {
}
I can pattern match on them like this
match three {
Three::A => (),
Three::B => (),
Three::C => (),
};
match two {
Two::A => (),
Two::B => (),
};
match one {
One::A => (),
};
match zero {
};
But if I put them inside something (not just a tuple), I can no longer match the empty case
match (three,) {
(Three::A,) => (),
(Three::B,) => (),
(Three::C,) => (),
}
match (two,) {
(Two::A,) => (),
(Two::B,) => (),
};
match (one,) {
(One::A,) => (),
};
match (zero,) { // ERROR!
};
This is inconsistent.
Metadata
Metadata
Assignees
Labels
No labels