summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/reexport-doc-hidden-inside-private.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/reexport-doc-hidden-inside-private.rs')
-rw-r--r--tests/rustdoc/reexport-doc-hidden-inside-private.rs16
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 000000000..e9d243d8a
--- /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::*;