about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2024-04-25 00:03:14 +0200
committerTshepang Mbambo <tshepang@gmail.com>2024-05-06 08:48:21 +0200
commiteef30e68e7d7367901763b243799622332c03134 (patch)
treea9efb2aa44d05a4728f13ad08e8f15205d58be9e /src/doc/rustc-dev-guide
parent3e905285f45fe0990851105d054d56a740dc1869 (diff)
Add documentation for check-cfg by-default in UI tests
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/tests/headers.md1
-rw-r--r--src/doc/rustc-dev-guide/src/tests/ui.md3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/tests/headers.md b/src/doc/rustc-dev-guide/src/tests/headers.md
index 1f2474aa03d..88a87181e5b 100644
--- a/src/doc/rustc-dev-guide/src/tests/headers.md
+++ b/src/doc/rustc-dev-guide/src/tests/headers.md
@@ -91,6 +91,7 @@ found in [`header.rs`] from the compiletest source.
     * [`error-pattern`](ui.md#error-pattern) — errors not on a line
     * `incremental` — incremental tests not in the incremental test-suite
     * `no-prefer-dynamic` — don't use `-C prefer-dynamic`, don't build as a dylib
+    * `no-auto-check-cfg` — disable auto check-cfg (only for `--check-cfg` tests)
     * `force-host` — build only for the host target
     * [`revisions`](compiletest.md#revisions) — compile multiple times
     * [`forbid-output`](compiletest.md#incremental-tests) — incremental cfail rejects output pattern
diff --git a/src/doc/rustc-dev-guide/src/tests/ui.md b/src/doc/rustc-dev-guide/src/tests/ui.md
index 3f850264075..08068235a03 100644
--- a/src/doc/rustc-dev-guide/src/tests/ui.md
+++ b/src/doc/rustc-dev-guide/src/tests/ui.md
@@ -361,6 +361,9 @@ multiple `.stderr` files for the different outputs.
 In the example above, there would be a `.mir.stderr` and `.thir.stderr` file
 with the different outputs of the different revisions.
 
+> Note: cfg revisions also work inside the source code with `#[cfg]` attributes.
+> 
+> By-convention the `FALSE` cfg is used to have an always false config.
 
 ## Controlling pass/fail expectations