Skip to content

Commit 5fe7712

Browse files
committed
rustc-dev-guide: document needs-crate-type
1 parent 57135c4 commit 5fe7712

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/doc/rustc-dev-guide/src/tests/directives.md

Lines changed: 6 additions & 1 deletion
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

0 commit comments

Comments
 (0)