diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-05-30 17:43:56 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-05-30 20:27:53 +0200 |
| commit | 9906504c64a5adfbce3b6bb6a467e4d2d6f39af8 (patch) | |
| tree | 5b5c94c4142adf2cbf32e82b51ad906602803796 /tests | |
| parent | 5528757ffecd11f4f63cf37209382dfdccc522c2 (diff) | |
| download | rust-9906504c64a5adfbce3b6bb6a467e4d2d6f39af8.tar.gz rust-9906504c64a5adfbce3b6bb6a467e4d2d6f39af8.zip | |
Add regression test for re-export of doc hidden item inside private item not displayed
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/rustdoc/reexport-doc-hidden-inside-private.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/rustdoc/reexport-doc-hidden-inside-private.rs b/tests/rustdoc/reexport-doc-hidden-inside-private.rs new file mode 100644 index 00000000000..1e4216d3c0c --- /dev/null +++ b/tests/rustdoc/reexport-doc-hidden-inside-private.rs @@ -0,0 +1,16 @@ +// This test ensures that a re-export of `#[doc(hidden)]` item inside a private +// module will still be displayed (the re-export, not the item). + +#![crate_name = "foo"] + +mod private_module { + #[doc(hidden)] + pub struct Public; +} + +// @has 'foo/index.html' +// @has - '//*[@id="reexport.Foo"]/code' 'pub use crate::private_module::Public as Foo;' +pub use crate::private_module::Public as Foo; +// Glob re-exports with no visible items should not be displayed. +// @count - '//*[@class="item-table"]/li' 1 +pub use crate::private_module::*; |
