-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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.
Description
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:
warning: `#[must_use]` has no effect when applied to a provided trait method
--> src/x86_x64/avx.rs:2250:3
|
2250 | #[must_use]
| ^^^^^^^^^^^
so far so good, except cargo fix
can't just remove all the useless must_use
for me, which it should be able to do.
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.