Skip to content

Commit

Permalink
Add regression test for re-export of doc hidden item inside private i…
Browse files Browse the repository at this point in the history
…tem not displayed
  • Loading branch information
GuillaumeGomez committed May 30, 2023
1 parent 5528757 commit 9906504
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/rustdoc/reexport-doc-hidden-inside-private.rs
Original file line number Diff line number Diff line change
@@ -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::*;

0 comments on commit 9906504

Please sign in to comment.