Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix re-export of doc hidden item inside private item not displayed #112108

Merged
merged 2 commits into from
May 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add regression test for re-export of doc hidden item inside private i…
…tem not displayed
  • Loading branch information
GuillaumeGomez committed May 30, 2023
commit 9906504c64a5adfbce3b6bb6a467e4d2d6f39af8
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::*;