-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #106741 - GuillaumeGomez:reexport-doc-hidden, r=notri…
…ddle 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`
- Loading branch information
Showing
4 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |