Skip to content

Commit 710389f

Browse files
committed
rustc-dev-guide: Mention --extern modifiers for aux-crate directive
1 parent afe980a commit 710389f

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

src/tests/compiletest.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,9 @@ to link to the extern crate to make the crate be available as an extern prelude.
655655
That allows you to specify the additional syntax of the `--extern` flag, such as
656656
renaming a dependency. For example, `//@ aux-crate:foo=bar.rs` will compile
657657
`auxiliary/bar.rs` and make it available under then name `foo` within the test.
658-
This is similar to how Cargo does dependency renaming.
658+
This is similar to how Cargo does dependency renaming. It is also possible to
659+
specify [`--extern` modifiers](https://github.com/rust-lang/rust/issues/98405).
660+
For example, `//@ aux-crate:noprelude:foo=bar.rs`.
659661

660662
`aux-bin` is similar to `aux-build` but will build a binary instead of a
661663
library. The binary will be available in `auxiliary/bin` relative to the working

src/tests/directives.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ Directives can generally be found by browsing the
5353

5454
See [Building auxiliary crates](compiletest.html#building-auxiliary-crates)
5555

56-
| Directive | Explanation | Supported test suites | Possible values |
57-
|-----------------------|-------------------------------------------------------------------------------------------------------|----------------------------------------|-----------------------------------------------|
58-
| `aux-bin` | Build a aux binary, made available in `auxiliary/bin` relative to test directory | All except `run-make`/`run-make-cargo` | Path to auxiliary `.rs` file |
59-
| `aux-build` | Build a separate crate from the named source file | All except `run-make`/`run-make-cargo` | Path to auxiliary `.rs` file |
60-
| `aux-crate` | Like `aux-build` but makes available as extern prelude | All except `run-make`/`run-make-cargo` | `<extern_prelude_name>=<path/to/aux/file.rs>` |
61-
| `aux-codegen-backend` | Similar to `aux-build` but pass the compiled dylib to `-Zcodegen-backend` when building the main file | `ui-fulldeps` | Path to codegen backend file |
62-
| `proc-macro` | Similar to `aux-build`, but for aux forces host and don't use `-Cprefer-dynamic`[^pm]. | All except `run-make`/`run-make-cargo` | Path to auxiliary proc-macro `.rs` file |
63-
| `build-aux-docs` | Build docs for auxiliaries as well. Note that this only works with `aux-build`, not `aux-crate`. | All except `run-make`/`run-make-cargo` | N/A |
56+
| Directive | Explanation | Supported test suites | Possible values |
57+
|-----------------------|-------------------------------------------------------------------------------------------------------|----------------------------------------|--------------------------------------------------------------------|
58+
| `aux-bin` | Build a aux binary, made available in `auxiliary/bin` relative to test directory | All except `run-make`/`run-make-cargo` | Path to auxiliary `.rs` file |
59+
| `aux-build` | Build a separate crate from the named source file | All except `run-make`/`run-make-cargo` | Path to auxiliary `.rs` file |
60+
| `aux-crate` | Like `aux-build` but makes available as extern prelude | All except `run-make`/`run-make-cargo` | `[<extern_modifiers>:]<extern_prelude_name>=<path/to/aux/file.rs>` |
61+
| `aux-codegen-backend` | Similar to `aux-build` but pass the compiled dylib to `-Zcodegen-backend` when building the main file | `ui-fulldeps` | Path to codegen backend file |
62+
| `proc-macro` | Similar to `aux-build`, but for aux forces host and don't use `-Cprefer-dynamic`[^pm]. | All except `run-make`/`run-make-cargo` | Path to auxiliary proc-macro `.rs` file |
63+
| `build-aux-docs` | Build docs for auxiliaries as well. Note that this only works with `aux-build`, not `aux-crate`. | All except `run-make`/`run-make-cargo` | N/A |
6464

6565
[^pm]: please see the [Auxiliary proc-macro section](compiletest.html#auxiliary-proc-macro) in the compiletest chapter for specifics.
6666

0 commit comments

Comments
 (0)