@@ -6,12 +6,12 @@ release: true
6
6
---
7
7
8
8
Since Clippy [ ` v0.0.97 ` ] and before it was shipped with ` rustup ` , Clippy
9
- implicitly added a ` feature = "cargo-clippy" ` [ ^ 1 ] when linting your code with
10
- ` cargo clippy ` .
9
+ implicitly added a ` feature = "cargo-clippy" ` config [ ^ 1 ] when linting your code
10
+ with ` cargo clippy ` .
11
11
12
12
[ ^ 1 ] : It's likely, that you didn't even know that Clippy implicitly sets this
13
- feature. This is intentional, as we stopped advertising and documenting this
14
- a long time ago.
13
+ config (which was not a Cargo feature) . This is intentional, as we stopped
14
+ advertising and documenting this a long time ago.
15
15
16
16
Back in the day (2016) this was necessary to allow, warn or deny lints with
17
17
attributes:
@@ -65,23 +65,25 @@ taking this opportunity to transition to [setting lint levels in
65
65
66
66
## Motivation for Deprecation
67
67
68
- There's a plan to stabilize [ checking conditional compilation at compile
69
- time] [ rfc-3013 ] , aka ` cargo check -Zcheck-cfg ` . If we were to keep `feature =
70
- "cargo-clippy"` , users would start seeing a lot of warnings when running ` cargo
71
- clippy`. To work around this, they would have to add a dummy feature to their
72
- ` Cargo.toml ` in order to silence those warnings:
68
+ Currently, there's a [ call for testing] , in order to stabilize [ checking
69
+ conditional compilation at compile time] [ rfc-3013 ] , aka `cargo check
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:
73
74
74
75
``` toml
75
76
[features ]
76
77
cargo-clippy = []
77
78
```
78
79
79
80
We didn't think this would be user friendly and decided, that we want to
80
- deprecate the implicit ` feature = "cargo-clippy" ` and replace it with
81
- ` cfg( clippy) ` instead.
81
+ deprecate the implicit ` feature = "cargo-clippy" ` config and replace it with the
82
+ ` clippy ` config instead.
82
83
83
84
[ `v0.0.97` ] : https://github.com/rust-lang/rust-clippy/blob/61daf674eaf17f3b504c51f01b4ee63fac47dfcf/CHANGELOG.md?plain=0#0097--2016-11-03
84
85
[ rfc-3013 ] : https://github.com/rust-lang/rfcs/pull/3013
85
86
[ use case ] : https://doc.rust-lang.org/clippy/configuration.html#disabling-evaluation-of-certain-code
86
87
[ pr-12292 ] : https://github.com/rust-lang/rust-clippy/pull/12292
87
88
[ cargo-lints ] : https://doc.rust-lang.org/cargo/reference/manifest.html#the-lints-section
89
+ [ call for testing ] : https://github.com/rust-lang/rfcs/pull/3013#issuecomment-1936648479
0 commit comments