Skip to content

Commit 544d262

Browse files
authored
Document the //@ unused-revision-names: test header (#1991)
1 parent 203ade3 commit 544d262

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Diff for: src/tests/compiletest.md

+13
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,19 @@ Following is classes of tests that support revisions:
639639
- rustdoc UI tests
640640
- incremental (these are special in that they inherently cannot be run in parallel)
641641

642+
### Ignoring unused revision names
643+
644+
Normally, revision names mentioned in other headers and error annotations must
645+
correspond to an actual revision declared in a `revisions` header. This is
646+
enforced by an `./x test tidy` check.
647+
648+
If a revision name needs to be temporarily removed from the revision list for
649+
some reason, the above check can be suppressed by adding the revision name to
650+
an `//@ unused-revision-names:` header instead.
651+
652+
Specifying an unused name of `*` (i.e. `//@ unused-revision-names: *`) will
653+
permit any unused revision name to be mentioned.
654+
642655
## Compare modes
643656

644657
Compiletest can be run in different modes, called _compare modes_, which can

Diff for: src/tests/headers.md

+2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ found in [`header.rs`] from the compiletest source.
9494
* `no-auto-check-cfg` — disable auto check-cfg (only for `--check-cfg` tests)
9595
* `force-host` — build only for the host target
9696
* [`revisions`](compiletest.md#revisions) — compile multiple times
97+
* [`unused-revision-names`](compiletest.md#ignoring-unused-revision-names) -
98+
suppress tidy checks for mentioning unknown revision names
9799
* [`forbid-output`](compiletest.md#incremental-tests) — incremental cfail rejects output pattern
98100
* [`should-ice`](compiletest.md#incremental-tests) — incremental cfail should ICE
99101
* [`known-bug`](ui.md#known-bugs) — indicates that the test is

0 commit comments

Comments
 (0)