about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-01-25 23:15:25 +0100
committerGitHub <noreply@github.com>2025-01-25 23:15:25 +0100
commitdbe911a64d78f8a74266d96e6235a4f3727bab17 (patch)
treea46402e1b3f53140bbf915e6f8fbeffbae8753ca /src
parentf14993b454b8f46c675cd1e5a7f33f43825975fc (diff)
parent74223e46672fd1bc4b6020abb6a97c7ef91b5ce1 (diff)
downloadrust-dbe911a64d78f8a74266d96e6235a4f3727bab17.tar.gz
rust-dbe911a64d78f8a74266d96e6235a4f3727bab17.zip
Rollup merge of #136016 - Urgau:check-cfg-allow-test-improv, r=jieyouxu
Improve check-cfg expected names diagnostic

This PR improves the check-cfg `allow-same-level` test by ~~normalizing it's output and by~~ adding more context to the test.

It also filters the well known cfgs from the `expected names are` note, as to reduce the size of the diagnostic. Users can still find the full list on the [rustc book](https://doc.rust-lang.org/nightly/rustc/check-cfg.html#well-known-names-and-values), which is reinforced for Cargo users by adding a note in the Cargo check-cfg specific section.

Fixes https://github.com/rust-lang/rust/issues/135995
r? `@jieyouxu`
Diffstat (limited to 'src')
-rw-r--r--src/doc/rustc/src/check-cfg/cargo-specifics.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/doc/rustc/src/check-cfg/cargo-specifics.md b/src/doc/rustc/src/check-cfg/cargo-specifics.md
index bd4bebbc874..371bbd26e94 100644
--- a/src/doc/rustc/src/check-cfg/cargo-specifics.md
+++ b/src/doc/rustc/src/check-cfg/cargo-specifics.md
@@ -13,6 +13,8 @@ the `unexpected_cfgs` lint and `--check-cfg` flag. It is not intended to provide
 individual details, for that refer to the [`--check-cfg` documentation](../check-cfg.md) and
 to the [Cargo book](../../cargo/index.html).
 
+> The full list of well known cfgs (aka builtins) can be found under [Checking conditional configurations / Well known names and values](../check-cfg.md#well-known-names-and-values).
+
 ## Cargo feature
 
 *See the [`[features]` section in the Cargo book][cargo-features] for more details.*