1
Fork 0

Rollup merge of #121137 - GuillaumeGomez:add-clippy-cfg, r=Urgau,Nilstrieb

Add clippy into the known `cfg` list

In clippy, we are removing the `feature = "cargo-clippy"` cfg to replace it with `clippy` in https://github.com/rust-lang/rust-clippy/pull/12292. But for it to work, we need to declare `clippy` as cfg. It makes it more coherent with other existing tools like rustdoc.

cc `@flip1995`
This commit is contained in:
Guillaume Gomez 2024-02-16 17:08:13 +01:00 committed by GitHub
commit f60576b3df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 66 additions and 45 deletions

View file

@ -1435,12 +1435,16 @@ impl CheckCfg {
//
// When adding a new config here you should also update
// `tests/ui/check-cfg/well-known-values.rs`.
//
// Don't forget to update `src/doc/unstable-book/src/compiler-flags/check-cfg.md`
// in the unstable book as well!
ins!(sym::debug_assertions, no_values);
// These three are never set by rustc, but we set them anyway: they
// should not trigger a lint because `cargo doc`, `cargo test`, and
// `cargo miri run` (respectively) can set them.
// These four are never set by rustc, but we set them anyway: they
// should not trigger a lint because `cargo clippy`, `cargo doc`,
// `cargo test` and `cargo miri run` (respectively) can set them.
ins!(sym::clippy, no_values);
ins!(sym::doc, no_values);
ins!(sym::doctest, no_values);
ins!(sym::miri, no_values);