Skip to content

Commit

Permalink
Add test for displayed re-export of doc(hidden)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jan 12, 2023
1 parent 2633d5f commit 675640c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/rustdoc/reexport-doc-hidden.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Part of <https://github.com/rust-lang/rust/issues/59368>.
// This test ensures that reexporting a `doc(hidden)` item will
// still show the reexport.

#![crate_name = "foo"]

#[doc(hidden)]
pub type Type = u32;

// @has 'foo/index.html'
// @has - '//*[@id="reexport.Type2"]/code' 'pub use crate::Type as Type2;'
pub use crate::Type as Type2;

// @count - '//*[@id="reexport.Type3"]' 0
#[doc(hidden)]
pub use crate::Type as Type3;

#[macro_export]
#[doc(hidden)]
macro_rules! foo {
() => {};
}

// This is a bug: https://github.com/rust-lang/rust/issues/59368
// @!has - '//*[@id="reexport.Macro"]/code' 'pub use crate::foo as Macro;'
pub use crate::foo as Macro;

0 comments on commit 675640c

Please sign in to comment.