@@ -9,12 +9,12 @@ Since Clippy [`v0.0.97`] and before it was shipped with `rustup`, Clippy
9
9
implicitly added a ` feature = "cargo-clippy" ` config[ ^ 1 ] when linting your code
10
10
with ` cargo clippy ` .
11
11
12
- [ ^ 1 ] : It's likely, that you didn't even know that Clippy implicitly sets this
12
+ [ ^ 1 ] : It's likely that you didn't even know that Clippy implicitly sets this
13
13
config (which was not a Cargo feature). This is intentional, as we stopped
14
14
advertising and documenting this a long time ago.
15
15
16
- Back in the day (2016) this was necessary to allow, warn or deny lints with
17
- attributes:
16
+ Back in the day (2016) this was necessary to allow, warn or deny Clippy lints
17
+ using attributes:
18
18
19
19
``` rust
20
20
#[cfg_attr(feature = " cargo-clippy" , allow(clippy_lint_name))]
@@ -59,27 +59,27 @@ In addition, check your `.cargo/config` file for:
59
59
rustflags = [" -Aclippy::..." ]
60
60
```
61
61
62
- This file you have to update yourself, by either changing it to ` cfg(clippy) ` or
63
- taking this opportunity to transition to [ setting lint levels in
64
- ` Cargo.toml ` ] [ cargo-lints ] directly.
62
+ If you have this config, you will have to update it yourself, by either changing
63
+ it to ` cfg(clippy) ` or taking this opportunity to transition to [ setting lint
64
+ levels in ` Cargo.toml ` ] [ cargo-lints ] directly.
65
65
66
66
## Motivation for Deprecation
67
67
68
68
Currently, there's a [ call for testing] , in order to stabilize [ checking
69
69
conditional compilation at compile time] [ rfc-3013 ] , aka `cargo check
70
70
-Zcheck-cfg` . If we were to keep the ` feature = "cargo-clippy"` config, users
71
- would start seeing a lot of warnings when running ` cargo clippy` . To work around
72
- this, they would have to add a dummy feature to their ` Cargo.toml ` in order to
73
- silence those warnings:
71
+ would start seeing a lot of warnings on their ` feature = "cargo- clippy" `
72
+ conditions. To work around this, they would either need to allow the lin or have
73
+ to add a dummy feature to their ` Cargo.toml ` in order to silence those warnings:
74
74
75
75
``` toml
76
76
[features ]
77
77
cargo-clippy = []
78
78
```
79
79
80
- We didn't think this would be user friendly and decided, that we want to
80
+ We didn't think this would be user friendly, and decided that instead we want to
81
81
deprecate the implicit ` feature = "cargo-clippy" ` config and replace it with the
82
- ` clippy ` config instead .
82
+ ` clippy ` config.
83
83
84
84
[ `v0.0.97` ] : https://github.com/rust-lang/rust-clippy/blob/61daf674eaf17f3b504c51f01b4ee63fac47dfcf/CHANGELOG.md?plain=0#0097--2016-11-03
85
85
[ rfc-3013 ] : https://github.com/rust-lang/rfcs/pull/3013
0 commit comments