@@ -8,24 +8,23 @@ They must appear before the Rust source in the test.
88They may also appear in Makefiles for [ run-make tests] ( compiletest.md#run-make-tests ) .
99
1010They are normally put after the short comment that explains the point of this test.
11- Some test suites use ` //@ ` to signal that a comment is a header, but most are still
12- just using plain comments.
13- For example, this test uses the ` // compile-flags ` command to specify a custom
11+ Compiletest test suites use ` //@ ` to signal that a comment is a header.
12+ For example, this test uses the ` //@ compile-flags ` command to specify a custom
1413flag to give to rustc when the test is compiled:
1514
1615``` rust,ignore
1716// Test the behavior of `0 - 1` when overflow checks are disabled.
1817
19- // compile-flags: -C overflow-checks=off
18+ //@ compile-flags: -C overflow-checks=off
2019
2120fn main() {
2221 let x = 0 - 1;
2322 ...
2423}
2524```
2625
27- Header commands can be standalone (like ` // run-pass ` ) or take a value (like
28- ` // compile-flags: -C overflow-checks=off ` ).
26+ Header commands can be standalone (like ` //@ run-pass ` ) or take a value (like
27+ ` //@ compile-flags: -C overflow-checks=off ` ).
2928
3029## Header commands
3130
@@ -192,10 +191,10 @@ The following headers are generally available, and not specific to particular
192191test suites.
193192
194193* ` compile-flags ` passes extra command-line args to the compiler,
195- e.g. ` // compile-flags: -g ` which forces debuginfo to be enabled.
194+ e.g. ` //@ compile-flags: -g ` which forces debuginfo to be enabled.
196195* ` run-flags ` passes extra args to the test if the test is to be executed.
197196* ` edition ` controls the edition the test should be compiled with
198- (defaults to 2015). Example usage: ` // edition:2018 ` .
197+ (defaults to 2015). Example usage: ` //@ edition:2018 ` .
199198* ` failure-status ` specifies the numeric exit code that should be expected for
200199 tests that expect an error.
201200 If this is not set, the default is 1.
@@ -239,7 +238,7 @@ For example, if you need to pass a compiler flag with a path to a specific
239238file, something like the following could work:
240239
241240``` rust,ignore
242- // compile-flags: --remap-path-prefix={{src-base}}=/the/src
241+ //@ compile-flags: --remap-path-prefix={{src-base}}=/the/src
243242```
244243
245244Where the sentinel ` {{src-base}} ` will be replaced with the appropriate path
@@ -285,8 +284,8 @@ also in [`src/tools/compiletest/src/header.rs`] (note that the `Config`
285284struct's declaration block is found in [ ` src/tools/compiletest/src/common.rs ` ] ).
286285` TestProps ` 's ` load_from() ` method will try passing the current line of text to
287286each parser, which, in turn typically checks to see if the line begins with a
288- particular commented (` // ` ) header command such as ` // must-compile-successfully `
289- or ` // failure-status ` . Whitespace after the comment marker is optional.
287+ particular commented (` //@ ` ) header command such as ` //@ must-compile-successfully `
288+ or ` //@ failure-status ` . Whitespace after the comment marker is optional.
290289
291290Parsers will override a given header command property's default value merely by
292291being specified in the test file as a header command or by having a parameter
0 commit comments