-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
unused variable: warn about std::collections that are pushed to but not used afterwards #49151
Copy link
Copy link
Open
Labels
A-collectionsArea: `std::collections`Area: `std::collections`A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-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-collectionsArea: `std::collections`Area: `std::collections`A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-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.
I would expect a warning here that
varis unused.I get that it is "used" in the sense that we push to it, however the resulting vector is still not done anything with.
Some kind of dead-store warning about the collection being unused/never queried after receiving an item might be helpful.