Skip to content

Commit

Permalink
compiletest: clarify that headers must be one header per line
Browse files Browse the repository at this point in the history
  • Loading branch information
jieyouxu authored and tshepang committed Apr 11, 2024
1 parent 9fbba97 commit f703523
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/tests/headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Header commands are special comments that tell compiletest how to build and
interpret a test.
They must appear before the Rust source in the test.
They may also appear in legacy Makefiles for
They may also appear in `rmake.rs` or legacy Makefiles for
[run-make tests](compiletest.md#run-make-tests).

They are normally put after the short comment that explains the point of this test.
Expand All @@ -27,6 +27,10 @@ fn main() {
Header commands can be standalone (like `//@ run-pass`) or take a value (like
`//@ compile-flags: -C overflow-checks=off`).

Header commands are written with one header per line: you cannot write multiple
headers on the same line. For example, if you write `//@ only-x86 only-windows`
then `only-windows` is interpreted as a comment, not a separate directive.

## Header commands

The following is a list of header commands.
Expand Down

0 comments on commit f703523

Please sign in to comment.