about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-11 10:10:44 +0100
committerGitHub <noreply@github.com>2019-12-11 10:10:44 +0100
commit4c3e95e84b0924f0b7e45a2bb1c74f3d7bec4691 (patch)
treef32ac318e97210fb64d874b9c4c2b4292074f333 /src/test/rustdoc
parent04e0512c7a94736e104e5d25a4705c37fa93a7e2 (diff)
parent60d4e20ff07ac4546f47f09094c7c04b577f0966 (diff)
downloadrust-4c3e95e84b0924f0b7e45a2bb1c74f3d7bec4691.tar.gz
rust-4c3e95e84b0924f0b7e45a2bb1c74f3d7bec4691.zip
Rollup merge of #67074 - ehuss:extern-options, r=petrochenkov
Add options to --extern flag.

This changes the `--extern` flag so that it can take a series of options that changes its behavior. The general syntax is `[opts ':'] name ['=' path]` where `opts` is a comma separated list of options. Two options are supported, `priv` which replaces `--extern-private` and `noprelude` which avoids adding the crate to the extern prelude.

```text
--extern priv:mylib=/path/to/libmylib.rlib
--extern noprelude:alloc=/path/to/liballoc.rlib
```

`noprelude` is to be used by Cargo's build-std feature in order to use `--extern` to reference standard library crates.

This also includes a second commit which adds the `aux-crate` directive to compiletest. I can split this off into a separate PR if desired, but it helps with defining these kinds of tests. It is based on #54020, and can be used in the future to replace and simplify some of the Makefile tests.
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/issue-66159.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/rustdoc/issue-66159.rs b/src/test/rustdoc/issue-66159.rs
index a69ba61a283..003d079a470 100644
--- a/src/test/rustdoc/issue-66159.rs
+++ b/src/test/rustdoc/issue-66159.rs
@@ -1,6 +1,5 @@
-// aux-build:issue-66159-1.rs
+// aux-crate:priv:issue_66159_1=issue-66159-1.rs
 // compile-flags:-Z unstable-options
-// extern-private:issue_66159_1
 
 // The issue was an ICE which meant that we never actually generated the docs
 // so if we have generated the docs, we're okay.