diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-07-24 16:01:42 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-07-24 16:32:06 +0200 |
| commit | 7150e35c924c5cf1ca0a0e5c41f79a63b9e668da (patch) | |
| tree | e54d4699bd1afc4b8d7d4d719b98d29b909797a6 /tests | |
| parent | 2e5642dca19c5ad004a25301a77361f0380e2933 (diff) | |
| download | rust-7150e35c924c5cf1ca0a0e5c41f79a63b9e668da.tar.gz rust-7150e35c924c5cf1ca0a0e5c41f79a63b9e668da.zip | |
Add regression test for #113982
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/rustdoc/auxiliary/issue-113982-doc_auto_cfg-reexport-foreign.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc/issue-113982-doc_auto_cfg-reexport-foreign.rs | 19 |
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/rustdoc/auxiliary/issue-113982-doc_auto_cfg-reexport-foreign.rs b/tests/rustdoc/auxiliary/issue-113982-doc_auto_cfg-reexport-foreign.rs new file mode 100644 index 00000000000..a1a716f5a41 --- /dev/null +++ b/tests/rustdoc/auxiliary/issue-113982-doc_auto_cfg-reexport-foreign.rs @@ -0,0 +1,3 @@ +#![crate_name = "colors"] + +pub struct Color; diff --git a/tests/rustdoc/issue-113982-doc_auto_cfg-reexport-foreign.rs b/tests/rustdoc/issue-113982-doc_auto_cfg-reexport-foreign.rs new file mode 100644 index 00000000000..88b86d15c56 --- /dev/null +++ b/tests/rustdoc/issue-113982-doc_auto_cfg-reexport-foreign.rs @@ -0,0 +1,19 @@ +// aux-build: issue-113982-doc_auto_cfg-reexport-foreign.rs + +#![feature(no_core, doc_auto_cfg)] +#![no_core] +#![crate_name = "foo"] + +extern crate colors; + +// @has 'foo/index.html' '//*[@class="stab portability"]' 'Non-colors' +// @has 'foo/struct.Color.html' '//*[@class="stab portability"]' \ +// 'Available on non-crate feature colors only.' +#[cfg(not(feature = "colors"))] +pub use colors::*; + +// @has 'foo/index.html' '//*[@class="stab portability"]' 'Non-fruits' +// @has 'foo/struct.Red.html' '//*[@class="stab portability"]' \ +// 'Available on non-crate feature fruits only.' +#[cfg(not(feature = "fruits"))] +pub use colors::Color as Red; |
