1
Fork 0

[rustdoc] hide item that is not marked as doc(inline) and whose src is doc(hidden)

Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
This commit is contained in:
xizheyin 2025-02-27 20:54:26 +08:00
parent 96cfc75584
commit 133705c402
9 changed files with 60 additions and 26 deletions

View file

@ -0,0 +1,16 @@
// Test for <https://github.com/rust-lang/rust/issues/137342>.
#![crate_name = "foo"]
//@ has 'foo/index.html'
//@ !has - '//*[@id="main-content"]//*[@class="struct"]' 'Bar'
#[doc(hidden)]
pub struct Bar;
//@ !has - '//*' 'pub use crate::Bar as A;'
pub use crate::Bar as A;
//@ !has - '//*' 'pub use crate::A as B;'
pub use crate::A as B;
//@ has - '//dt/a[@class="struct"]' 'C'
#[doc(inline)]
pub use crate::Bar as C;