Extra semicolon inside trait definition gives nonideal error message #99822
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: (playground)
The current output is:
(In both stable 1.62.1 and nightly)
Ideally the output could be less generic and use more precise terms like "an unexpected semicolon" rather than "non-item" and "trait definition" rather than "item list", as well have a note that suggests removing the semicolon and provide rationale. I originally hit this error message after I added a default definition to a trait function and forgot to remove the semicolon.
The text was updated successfully, but these errors were encountered: