Improve syntax diagnostics or suggestions with enum
vs struct
#75770
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I changed an enum to a struct but forgot to change the
enum
keyword to astruct
keyword, it took me a while to realize what the problem was because the error is unclear.enum
used where code looks like a structThe error is
A suggestion saying
help: change `enum` to `struct`
would be useful.struct
used where code looks like an enumA suggestion saying
help: change `struct` to `enum`
would be useful.The text was updated successfully, but these errors were encountered: