-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Missing comma when defaulting fields on a struct #96871
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Context: You have an existing struct which has some fields defaulted. If you add another field but forget the comma like this:
Then currently rustc complains about a range. Here's a snapshot of an actual example:

It could be a legitimate range problem but in that situation it might very well be a missing comma.