You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/tests/directives.md
+15-9
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,7 @@ for more details.
101
101
|`normalize-stdout`| Normalize actual stdout with a rule `"<raw>" -> "<normalized>"` before comparing against snapshot |`ui`, `incremental`|`"<RAW>" -> "<NORMALIZED>"`, `<RAW>`/`<NORMALIZED>` is regex capture and replace syntax |
102
102
|`dont-check-compiler-stderr`| Don't check actual compiler stderr vs stderr snapshot |`ui`| N/A |
103
103
|`dont-check-compiler-stdout`| Don't check actual compiler stdout vs stdout snapshot |`ui`| N/A |
104
+
|`dont-require-annotations`| Don't require line annotations for the given diagnostic kind (`//~ KIND`) to be exhaustive |`ui`, `incremental`|`ERROR`, `WARN`, `NOTE`, `HELP`, `SUGGESTION`|
104
105
|`run-rustfix`| Apply all suggestions via `rustfix`, snapshot fixed output, and check fixed output builds |`ui`| N/A |
105
106
|`rustfix-only-machine-applicable`|`run-rustfix` but only machine-applicable suggestions |`ui`| N/A |
106
107
|`exec-env`| Env var to set when executing a test |`ui`, `crashes`|`<KEY>=<VALUE>`|
@@ -191,8 +192,13 @@ settings:
191
192
specified atomic widths, e.g. the test with `//@ needs-target-has-atomic: 8,
192
193
16, ptr` will only run if it supports the comma-separated list of atomic
193
194
widths.
194
-
-`needs-dynamic-linking`- ignores if target does not support dynamic linking
195
+
-`needs-dynamic-linking`— ignores if target does not support dynamic linking
195
196
(which is orthogonal to it being unable to create `dylib` and `cdylib` crate types)
197
+
-`needs-crate-type` — ignores if target platform does not support one or more
198
+
of the comma-delimited list of specified crate types. For example,
199
+
`//@ needs-crate-type: cdylib, proc-macro` will cause the test to be ignored
200
+
on `wasm32-unknown-unknown` target because the target does not support the
201
+
`proc-macro` crate type.
196
202
197
203
The following directives will check LLVM support:
198
204
@@ -229,14 +235,14 @@ ignoring debuggers.
229
235
230
236
### Affecting how tests are built
231
237
232
-
| Directive | Explanation | Supported test suites | Possible values |
|`compile-flags`| Flags passed to `rustc` when building the test or aux file | All except for `run-make`| Any valid `rustc` flags, e.g. `-Awarnings -Dfoo`. Cannot be `-Cincremental`.|
235
-
|`edition`|Alias for `compile-flags: --edition=xxx`| All except for `run-make`| Any valid `--edition` value |
236
-
|`rustc-env`| Env var to set when running `rustc`| All except for `run-make`|`<KEY>=<VALUE>`|
237
-
|`unset-rustc-env`| Env var to unset when running `rustc`| All except for `run-make`| Any env var name |
238
-
|`incremental`| Proper incremental support for tests outside of incremental test suite |`ui`, `crashes`| N/A |
239
-
|`no-prefer-dynamic`| Don't use `-C prefer-dynamic`, don't build as a dylib via a `--crate-type=dylib` preset flag |`ui`, `crashes`| N/A |
238
+
| Directive | Explanation | Supported test suites | Possible values |
|`compile-flags`| Flags passed to `rustc` when building the test or aux file | All except for `run-make`| Any valid `rustc` flags, e.g. `-Awarnings -Dfoo`. Cannot be `-Cincremental` or `--edition`|
241
+
|`edition`|The edition used to build the test| All except for `run-make`| Any valid `--edition` value|
242
+
|`rustc-env`| Env var to set when running `rustc`| All except for `run-make`|`<KEY>=<VALUE>`|
243
+
|`unset-rustc-env`| Env var to unset when running `rustc`| All except for `run-make`| Any env var name |
244
+
|`incremental`| Proper incremental support for tests outside of incremental test suite |`ui`, `crashes`| N/A |
245
+
|`no-prefer-dynamic`| Don't use `-C prefer-dynamic`, don't build as a dylib via a `--crate-type=dylib` preset flag |`ui`, `crashes`| N/A |
240
246
241
247
<divclass="warning">
242
248
Tests (outside of `run-make`) that want to use incremental tests not in the
0 commit comments