Skip to content

Commit c88ed9e

Browse files
committed
Address review comments
1 parent f56b2c6 commit c88ed9e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

posts/2024-02-16-Clippy-deprecating-feature-cargo-clippy.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ Since Clippy [`v0.0.97`] and before it was shipped with `rustup`, Clippy
99
implicitly added a `feature = "cargo-clippy"` config[^1] when linting your code
1010
with `cargo clippy`.
1111

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
1313
config (which was not a Cargo feature). This is intentional, as we stopped
1414
advertising and documenting this a long time ago.
1515

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:
1818

1919
```rust
2020
#[cfg_attr(feature = "cargo-clippy", allow(clippy_lint_name))]
@@ -59,27 +59,27 @@ In addition, check your `.cargo/config` file for:
5959
rustflags = ["-Aclippy::..."]
6060
```
6161

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.
6565

6666
## Motivation for Deprecation
6767

6868
Currently, there's a [call for testing], in order to stabilize [checking
6969
conditional compilation at compile time][rfc-3013], aka `cargo check
7070
-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:
7474

7575
```toml
7676
[features]
7777
cargo-clippy = []
7878
```
7979

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
8181
deprecate the implicit `feature = "cargo-clippy"` config and replace it with the
82-
`clippy` config instead.
82+
`clippy` config.
8383

8484
[`v0.0.97`]: https://github.com/rust-lang/rust-clippy/blob/61daf674eaf17f3b504c51f01b4ee63fac47dfcf/CHANGELOG.md?plain=0#0097--2016-11-03
8585
[rfc-3013]: https://github.com/rust-lang/rfcs/pull/3013

0 commit comments

Comments
 (0)