From 33edea60f018f889ce1a9f29c0d7617e859efa76 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 8 Nov 2023 15:44:29 +0100 Subject: [PATCH] Add test for reexported hidden item with `--document-hidden-items` --- tests/rustdoc-json/reexport/reexport_of_hidden.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/rustdoc-json/reexport/reexport_of_hidden.rs diff --git a/tests/rustdoc-json/reexport/reexport_of_hidden.rs b/tests/rustdoc-json/reexport/reexport_of_hidden.rs new file mode 100644 index 0000000000000..1b6ff5fadca17 --- /dev/null +++ b/tests/rustdoc-json/reexport/reexport_of_hidden.rs @@ -0,0 +1,10 @@ +// compile-flags: --document-hidden-items + +// @has "$.index[*].inner[?(@.import.name=='UsedHidden')]" +// @has "$.index[*][?(@.name=='Hidden')]" +pub mod submodule { + #[doc(hidden)] + pub struct Hidden {} +} + +pub use submodule::Hidden as UsedHidden;