Change:
<!-- Thank you for filing a bug report! Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. If you cannot produce a minimal reproduction case (something that would work in isolation), please provide the steps or even link to a repository that causes the problematic output to occur. --Although I know Enums take to form of: I sometimes find myself accidentally defining them as I would a Struct (): The current output is: This always takes more than a few seconds to parse and then realize my mistake. Is it possible to change this to something like: <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Do you have any suggestion for how the compiler should distinguish between "trying to write an enum with struct syntax" and "trying to write a struct but used the enum keyword"?
Linking to the topic on internals where some other folks have left suggestions (). Although none of those directly address your question. My gut reaction is to assume that if the "enum" keyword is used that truly was the intention of the developer, but if it wasn't, hopefully some help message like the : Would provide enough information to trigger an "Oh wait did I really want to use an enum here?"
claim

Discussion:
Ok((Some(vr), TrailingToken::MaybeComma)) }, <del> ) </del> <ins> ).map_err(|mut err|{ err.help("enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }`"); err }) </ins> } /// Parses `struct Foo { ... }`.

Err(e) => { // Parsing failed, therefore it must be something more serious // than just a missing separator. <ins> for xx in &e.children { // propagate the help message from sub error 'e' to main error 'expect_err; expect_err.children.push(xx.clone()); } </ins> expect_err.emit(); e.cancel();

LL | values!(STRING(1) as (String) => cfg(test),); | -------------------------------------------- in this macro invocation | <ins> = help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }` </ins> = note: this error originates in the macro `values` (in Nightly builds, run with -Z macro-backtrace for more info) error: macro expansion ignores token `(String)` and any following

| LL |     B == 2 |       ^^ help: try using `=` instead <ins> | = help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }` </ins> error: expected item, found `==` --> $DIR/issue-101477-enum.rs:6:7

<ins> enum VecOrMap{ vec: Vec<usize>, //~^ ERROR expected one of `(`, `,`, `=`, `{`, or `}`, found `:` //~| HELP: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }` //~| ERROR expected item, found `:` map: HashMap<String,usize> } fn main() {} </ins>

<ins> error: expected one of `(`, `,`, `=`, `{`, or `}`, found `:` --> $DIR/issue-103869.rs:2:8 | LL |     vec: Vec<usize>, |        ^ expected one of `(`, `,`, `=`, `{`, or `}` | = help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }` error: expected item, found `:` --> $DIR/issue-103869.rs:2:8 | LL |     vec: Vec<usize>, |        ^ expected item error: aborting due to 2 previous errors </ins>

LL |     test_macro!(String,); |     -------------------- in this macro invocation | <ins> = help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }` </ins> = note: this error originates in the macro `test_macro` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error

//~^ ERROR functions are not allowed in enum definitions //~| HELP unlike in C++, Java, and C#, functions are declared in `impl` blocks //~| HELP see https://doc.rust-lang.org/book/ch05-03-method-syntax.html for more information <ins> //~| HELP enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }` </ins> } fn main() {}

| = help: unlike in C++, Java, and C#, functions are declared in `impl` blocks = help: see https://doc.rust-lang.org/book/ch05-03-method-syntax.html for more information <ins> = help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }` </ins> error: aborting due to 3 previous errors