diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2024-06-08 22:13:44 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-08 13:13:44 +0100 |
| commit | fd44bc7954ff6f4bc24e6bb8eeae3e89881f489c (patch) | |
| tree | 045a7138094d4c8845fd8a0b8bcaa8beece234de /src/doc/rustc-dev-guide | |
| parent | fe90400b81e61507816dde865c54eb7272e64935 (diff) | |
| download | rust-fd44bc7954ff6f4bc24e6bb8eeae3e89881f489c.tar.gz rust-fd44bc7954ff6f4bc24e6bb8eeae3e89881f489c.zip | |
Document the `//@ unused-revision-names:` test header (#1991)
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/tests/compiletest.md | 13 | ||||
| -rw-r--r-- | src/doc/rustc-dev-guide/src/tests/headers.md | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/tests/compiletest.md b/src/doc/rustc-dev-guide/src/tests/compiletest.md index e57b5089228..0f9cd0552a2 100644 --- a/src/doc/rustc-dev-guide/src/tests/compiletest.md +++ b/src/doc/rustc-dev-guide/src/tests/compiletest.md @@ -639,6 +639,19 @@ Following is classes of tests that support revisions: - rustdoc UI tests - incremental (these are special in that they inherently cannot be run in parallel) +### Ignoring unused revision names + +Normally, revision names mentioned in other headers and error annotations must +correspond to an actual revision declared in a `revisions` header. This is +enforced by an `./x test tidy` check. + +If a revision name needs to be temporarily removed from the revision list for +some reason, the above check can be suppressed by adding the revision name to +an `//@ unused-revision-names:` header instead. + +Specifying an unused name of `*` (i.e. `//@ unused-revision-names: *`) will +permit any unused revision name to be mentioned. + ## Compare modes Compiletest can be run in different modes, called _compare modes_, which can diff --git a/src/doc/rustc-dev-guide/src/tests/headers.md b/src/doc/rustc-dev-guide/src/tests/headers.md index 88a87181e5b..a59ffe6cc35 100644 --- a/src/doc/rustc-dev-guide/src/tests/headers.md +++ b/src/doc/rustc-dev-guide/src/tests/headers.md @@ -94,6 +94,8 @@ found in [`header.rs`] from the compiletest source. * `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 + * [`unused-revision-names`](compiletest.md#ignoring-unused-revision-names) - + suppress tidy checks for mentioning unknown revision names * [`forbid-output`](compiletest.md#incremental-tests) — incremental cfail rejects output pattern * [`should-ice`](compiletest.md#incremental-tests) — incremental cfail should ICE * [`known-bug`](ui.md#known-bugs) — indicates that the test is |
