Skip to content

Commit 97ac2ff

Browse files
authored
Merge pull request #4270 from rust-lang/rustup-2025-04-12
Automatic Rustup
2 parents e077548 + 0e2d7c0 commit 97ac2ff

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

src/tests/directives.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,13 @@ settings:
191191
specified atomic widths, e.g. the test with `//@ needs-target-has-atomic: 8,
192192
16, ptr` will only run if it supports the comma-separated list of atomic
193193
widths.
194-
- `needs-dynamic-linking` - ignores if target does not support dynamic linking
194+
- `needs-dynamic-linking` ignores if target does not support dynamic linking
195195
(which is orthogonal to it being unable to create `dylib` and `cdylib` crate types)
196+
- `needs-crate-type` — ignores if target platform does not support one or more
197+
of the comma-delimited list of specified crate types. For example,
198+
`//@ needs-crate-type: cdylib, proc-macro` will cause the test to be ignored
199+
on `wasm32-unknown-unknown` target because the target does not support the
200+
`proc-macro` crate type.
196201

197202
The following directives will check LLVM support:
198203

@@ -229,14 +234,14 @@ ignoring debuggers.
229234

230235
### Affecting how tests are built
231236

232-
| Directive | Explanation | Supported test suites | Possible values |
233-
|---------------------|----------------------------------------------------------------------------------------------|---------------------------|------------------------------------------------------------------------------|
234-
| `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 |
237+
| Directive | Explanation | Supported test suites | Possible values |
238+
|---------------------|----------------------------------------------------------------------------------------------|---------------------------|--------------------------------------------------------------------------------------------|
239+
| `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` |
240+
| `edition` | The edition used to build the test | All except for `run-make` | Any valid `--edition` value |
241+
| `rustc-env` | Env var to set when running `rustc` | All except for `run-make` | `<KEY>=<VALUE>` |
242+
| `unset-rustc-env` | Env var to unset when running `rustc` | All except for `run-make` | Any env var name |
243+
| `incremental` | Proper incremental support for tests outside of incremental test suite | `ui`, `crashes` | N/A |
244+
| `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 |
240245

241246
<div class="warning">
242247
Tests (outside of `run-make`) that want to use incremental tests not in the

0 commit comments

Comments
 (0)