-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.WG-diagnosticsWorking group: DiagnosticsWorking group: Diagnostics
Description
Right now, writing something like struct S {};
just produces a parse error:
error: expected item, found `;`
--> src/main.rs:1:12
|
1 | struct S {};
| ^ help: consider removing this semicolon
We could make this error message much clearer by recognizing this common error and specifically saying "don't put a semicolon after a struct/union/enum declaration".
leonardo-m, oli-obk and wesleywiser
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.WG-diagnosticsWorking group: DiagnosticsWorking group: Diagnostics