The following code compiles just fine, but I don't think that it should ``` rust enum A { B } fn main() { match B { B(*) => {} } } ``` Is that actually valid syntax? I would expect to get a compiler error that you can't ignore all fields when there are none to begin with.
Activity
alexcrichton commentedon Sep 16, 2013
Nominating for the backwards-compatible milestone.
catamorphism commentedon Sep 16, 2013
Is this a bug? "Ignore all fields" is trivially true when there are zero fields.
thestinger commentedon Sep 16, 2013
I think this should be allowed, but see #5830 about the general inconsistency with these.
alexcrichton commentedon Sep 16, 2013
I'm ok with that.