rustdoc: Strip imports of items which are #[doc(hidden)]

Closes #106379
This commit is contained in:
Nixon Enraght-Moony 2023-01-06 17:57:03 +00:00
parent 7bbbaabbb6
commit ff46d116c1
4 changed files with 29 additions and 1 deletions

View file

@ -14,7 +14,8 @@ mod auto {
}
}
// @count "$.index[*][?(@.name=='builders')]" 2
// @count "$.index[*][?(@.name=='builders')]" 1
// @has "$.index[*][?(@.name == 'ActionRowBuilder')"]
pub use auto::*;
pub mod builders {

View file

@ -0,0 +1,15 @@
// Regression test for <https://github.com/rust-lang/rust/issues/106379>
#![feature(no_core)]
#![no_core]
mod repeat_n {
#[doc(hidden)]
pub struct RepeatN {}
}
pub use repeat_n::RepeatN;
// @count "$.index[*][?(@.name=='pub_use_doc_hidden')].inner.items[*]" 0
// @!has "$.index[*][?(@.kind=='struct')]"
// @!has "$.index[*][?(@.kind=='import')]"