rust-clippy
rust-clippy copied to clipboard
Suggest `#[expect(...)]` instead of `#[allow(...)]` to ensure relevance
What it does
With the introduction of #[expect] in 1.81.0, it is now possible to ensure that lint is actually relevant - i.e. there is no "allow" that does not get used. This lint would offer to replace all allow with expect
Advantage
- keep lint declarations relevant to the actual code
- avoids useless lint declarations, keeping the code tidy
Drawbacks
No idea who would want to "allow" just in case...
Example
#![allow(some_lint)]
Could be written as:
#![expect(some_lint)]