diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-05-05 16:34:16 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-05-05 17:47:18 +0200 |
| commit | eee6c9753588fe1888d3ddb264f9516e7ac56997 (patch) | |
| tree | 620f9abcdba83b6e7a6288b0f4400683949d2076 /tests/rustdoc/private/inline-private-with-intermediate-doc-hidden.rs | |
| parent | a00b39961a9b45c788b86ef9f874d886f5403280 (diff) | |
| download | rust-eee6c9753588fe1888d3ddb264f9516e7ac56997.tar.gz rust-eee6c9753588fe1888d3ddb264f9516e7ac56997.zip | |
Created `tests/rustdoc/private` subfolder to limit number of files at the top level
Diffstat (limited to 'tests/rustdoc/private/inline-private-with-intermediate-doc-hidden.rs')
| -rw-r--r-- | tests/rustdoc/private/inline-private-with-intermediate-doc-hidden.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/rustdoc/private/inline-private-with-intermediate-doc-hidden.rs b/tests/rustdoc/private/inline-private-with-intermediate-doc-hidden.rs new file mode 100644 index 00000000000..d27ecbad169 --- /dev/null +++ b/tests/rustdoc/private/inline-private-with-intermediate-doc-hidden.rs @@ -0,0 +1,23 @@ +// This test ensures that if a private item is re-exported with an intermediate +// `#[doc(hidden)]` re-export, it'll still be inlined (and not include any attribute +// from the doc hidden re-export. + +#![crate_name = "foo"] + +//@ has 'foo/index.html' +// There should only be one struct displayed. +//@ count - '//*[@id="main-content"]/*[@class="section-header"]' 1 +//@ has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs' +//@ has - '//*[@id="main-content"]//a[@href="struct.Reexport.html"]' 'Reexport' +//@ has - '//*[@id="main-content"]//dd' 'Visible. Original.' + +mod private { + /// Original. + pub struct Bar3; +} + +/// Hidden. +#[doc(hidden)] +pub use crate::private::Bar3; +/// Visible. +pub use self::Bar3 as Reexport; |
