-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
#[ignore(lint_name)] errors should suggest using #[allow(lint_name)] instead #154667
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.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 lintsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.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.
Code
#![ignore(clippy::single_match)]Current output
Desired output
Rationale and extra context
Recently I mixed up the name of the attribute used to silence warnings, and accidentally wrote
#[ignore(..)]instead of#[allow(..)].The compiler was right to reject my program, but I was briefly confused by why it wasn't working, because the error message doesn't give any indication of what the
ignoreattribute is for. That made it harder for me to correct my misunderstanding.Other cases
Rust Version
Anything else?
No response