-
-
Notifications
You must be signed in to change notification settings - Fork 15k
cargo fix renames unused local variables from foo to _foo #54196
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-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 lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-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.
For example:
I don't like that refactor because I might end up with local variables that do nothing. I think
cargo fixshould just ignore unused local variables all together. Ifcargo fixjust renames local variables to hide the warnings from the compiler, then the compiler lint is a bit pointless.Renaming unused function parameters seems fine.