-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
unused must_use warning should have an auto-fix to just remove the useless attribute #145257
Copy link
Copy link
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)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.D-lack-of-suggestionDiagnostics: Adding a (structured) suggestion would increase the quality of the diagnostic.Diagnostics: Adding a (structured) suggestion would increase the quality of the diagnostic.L-unused_attributesLint: unused_attributesLint: unused_attributesT-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-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)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.D-lack-of-suggestionDiagnostics: Adding a (structured) suggestion would increase the quality of the diagnostic.Diagnostics: Adding a (structured) suggestion would increase the quality of the diagnostic.L-unused_attributesLint: unused_attributesLint: unused_attributesT-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.
So I've got a project with 140
#[must_use]attributes on methods of trait impls. Rust tells me they have no effect when applied to a trait method:so far so good, except
cargo fixcan't just remove all the uselessmust_usefor me, which it should be able to do.