diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-02-16 17:08:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-16 17:08:13 +0100 |
| commit | f60576b3dfe856c4fb6cc3b9f0cd8b554f9ca0d0 (patch) | |
| tree | bbf5a6abc590cd3a13a6c9684f2a31a74ccab9c9 /compiler/rustc_session | |
| parent | 670bdbf8083760f5df1b1a3f4d24cdb395491790 (diff) | |
| parent | 533e3f0a840cc7d803c508a9732f411ef8682188 (diff) | |
| download | rust-f60576b3dfe856c4fb6cc3b9f0cd8b554f9ca0d0.tar.gz rust-f60576b3dfe856c4fb6cc3b9f0cd8b554f9ca0d0.zip | |
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`
Diffstat (limited to 'compiler/rustc_session')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index b89dfab2ca9..ef0512bf686 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -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); |
