unused tuple field warning should suggest deleting field if it's the last field #124556
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.
Code
Current output
Desired output
Rationale and extra context
The idea of changing a field to unit type to preserve field numbering makes sense for fields in the middle of a tuple. However, if the unused field is at the end, or it's the only field, then deleting it won't affect field numbering of any other field.
Other cases
No response
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: