-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
A-lintArea: New lintsArea: New lintsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
What it does
The #![feature(lint_reasons)] adds a new #[expect] attribute as described in RFC 2383.
It would be cool to have a restriction lint, that suggests replacing all #[allow] attributes with #[expect].
Lint Name
allow_attribute
Category
restriction
Notes
- This should be a restriction lint, as the
allowattribute has valid use cases. - The lint has to check for the
lint_reasonsfeature. - The lint should probably ignore crate attributes, or at least have an option to allow them. Crate attributes are
#![attr]in the root of the crate.
Example
#[allow(unused)]
let x = 0;Could be written as:
#[expect(unused)]
let x = 0;Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lintsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy