Error message when definining enum using struct syntax

Definitely file bugs when you hit things like this.

Personally, I think that whenever there's an "expected one of" message without a help: message, it's a good bug, as a great place for a quick syntax reminder. Sketch:

error: expected one of `(`, `,`, `=`, `{`, or `}`, found `:`
 --> src/lib.rs:2:8
  |
2 |     vec: Vec<usize>,
  |        ^ expected one of `(`, `,`, `=`, `{`, or `}`
  |
  | help: enum variants are either `Variant(Type)` or `Variant { field: Type }`
1 Like