Skip to content

Commit b8efa9f

Browse files
committed
Stick with "directives"
Don't mix both "headers" and "directives" which is needlessly confusing.
1 parent 8219457 commit b8efa9f

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
- [Best practices](./tests/best-practices.md)
2525
- [Compiletest](./tests/compiletest.md)
2626
- [UI tests](./tests/ui.md)
27-
- [Test headers](./tests/headers.md)
27+
- [Test headers](./tests/directives.md)
2828
- [Ecosystem testing](./tests/ecosystem.md)
2929
- [Crater](./tests/crater.md)
3030
- [Fuchsia](./tests/fuchsia.md)

src/tests/adding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ A few things to notice about our test:
7373

7474
- The top should start with a short comment that [explains what the test is
7575
for](#explanatory_comment).
76-
- The `//@ edition:2018` comment is called a [directive](headers.md) which
76+
- The `//@ edition:2018` comment is called a [directive](directives.md) which
7777
provides instructions to compiletest on how to build the test. Here we need to
7878
set the edition for `async` to work (the default is edition 2015).
7979
- Following that is the source of the test. Try to keep it succinct and to the

src/tests/best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,6 @@ See [LLVM FileCheck guide][FileCheck] for details.
183183
> Pending concrete advice.
184184
185185
[compiletest]: ./compiletest.md
186-
[compiletest directives]: ./headers.md
186+
[compiletest directives]: ./directives.md
187187
[`run-make`]: ./compiletest.md#run-make-tests
188188
[FileCheck]: https://llvm.org/docs/CommandGuide/FileCheck.html

src/tests/compiletest.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ individual and groups of tests.
2626
Tests are typically organized as a Rust source file with annotations in comments
2727
before and/or within the test code. These comments serve to direct `compiletest`
2828
on if or how to run the test, what behavior to expect, and more. See
29-
[directives](headers.md) and the test suite documentation below for more details
29+
[directives](directives.md) and the test suite documentation below for more details
3030
on these annotations.
3131

3232
See the [Adding new tests](adding.md) and [Best practies](best-practiecs.md)
@@ -93,7 +93,7 @@ The tests in [`tests/pretty`] exercise the "pretty-printing" functionality of
9393
input source into various different formats, such as the Rust source after macro
9494
expansion.
9595

96-
The pretty-printer tests have several [directives](headers.md) described below.
96+
The pretty-printer tests have several [directives](directives.md) described below.
9797
These commands can significantly change the behavior of the test, but the
9898
default behavior without any commands is to:
9999

@@ -242,7 +242,7 @@ fn main() {
242242
fn b() {}
243243
```
244244

245-
The following [directives](headers.md) are available to disable a test based on
245+
The following [directives](directives.md) are available to disable a test based on
246246
the debugger currently being used:
247247

248248
- `min-cdb-version: 10.0.18317.1001` — ignores the test if the version of cdb
@@ -575,7 +575,7 @@ known-bug` directive inside the test file.
575575
## Building auxiliary crates
576576

577577
It is common that some tests require additional auxiliary crates to be compiled.
578-
There are multiple [directives](headers.md) to assist with that:
578+
There are multiple [directives](directives.md) to assist with that:
579579

580580
- `aux-build`
581581
- `aux-crate`
File renamed without changes.

src/tests/ui.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ next to the test. See [Output comparison](#output-comparison) for more.
2828
Additionally, errors and warnings should be annotated with comments within the
2929
source file. See [Error annotations](#error-annotations) for more.
3030

31-
Compiletest [directives](headers.md) in the form of special comments prefixed
31+
Compiletest [directives](directives.md) in the form of special comments prefixed
3232
with `//@` control how the test is compiled and what the expected behavior is.
3333

3434
Tests are expected to fail to compile, since most tests are testing compiler
@@ -78,7 +78,7 @@ There can be multiple stdout/stderr files. The general form is:
7878
A simple example would be `foo.stderr` next to a `foo.rs` test.
7979
A more complex example would be `foo.my-revision.polonius.stderr`.
8080

81-
There are several [directives](headers.md) which will change how compiletest
81+
There are several [directives](directives.md) which will change how compiletest
8282
will check for output files:
8383

8484
- `stderr-per-bitwidth` — checks separate output files based on the target
@@ -168,7 +168,7 @@ usage example.
168168
[`main.stderr`]: https://github.com/rust-lang/rust/blob/master/tests/ui/transmute/main.stderr
169169

170170
Besides `normalize-stderr-32bit` and `-64bit`, one may use any target
171-
information or stage supported by [`ignore-X`](headers.md#ignoring-tests) here
171+
information or stage supported by [`ignore-X`](directives.md#ignoring-tests) here
172172
as well (e.g. `normalize-stderr-windows` or simply `normalize-stderr-test` for
173173
unconditional replacement).
174174

@@ -276,7 +276,7 @@ fn main() {
276276

277277
### `error-pattern`
278278

279-
The `error-pattern` [directive](headers.md) can be used for messages that don't
279+
The `error-pattern` [directive](directives.md) can be used for messages that don't
280280
have a specific span.
281281

282282
Let's think about this test:
@@ -366,7 +366,7 @@ By default, a UI test is expected to **generate a compile error** because most
366366
of the tests are checking for invalid input and error diagnostics. However, you
367367
can also make UI tests where compilation is expected to succeed, and you can
368368
even run the resulting program. Just add one of the following
369-
[directives](headers.md):
369+
[directives](directives.md):
370370

371371
- Pass directives:
372372
- `//@ check-pass` — compilation should succeed but skip codegen

0 commit comments

Comments
 (0)