1
Fork 0

Rollup merge of #106741 - GuillaumeGomez:reexport-doc-hidden, r=notriddle

Fix reexport of `doc(hidden)` item

Part of #59368.

It doesn't fix the `doc(inline)` nor the `doc(hidden)` on macro. I'll do it in a follow-up PR.

r? `@notriddle`
This commit is contained in:
Yuki Okushi 2023-01-13 05:47:23 +09:00 committed by GitHub
commit ea45b3ef1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 44 additions and 3 deletions

View file

@ -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;