Skip to content

Commit 139d32a

Browse files
committed
Add test
Signed-off-by: xizheyin <[email protected]>
1 parent 8b1c71d commit 139d32a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/rustdoc/doc-hidden-source.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Test for <https://github.com/rust-lang/rust/issues/137342>.
2+
3+
#![crate_name = "foo"]
4+
5+
//@ has 'foo/index.html'
6+
//@ !has - '//*[@id="main-content"]//*[@class="struct"]' 'Bar'
7+
#[doc(hidden)]
8+
pub struct Bar;
9+
10+
//@ !has - '//*' 'pub use crate::Bar as A;'
11+
pub use crate::Bar as A;
12+
//@ !has - '//*' 'pub use crate::A as B;'
13+
pub use crate::A as B;
14+
//@ has - '//dt/a[@class="struct"]' 'C'
15+
#[doc(inline)]
16+
pub use crate::Bar as C;

0 commit comments

Comments
 (0)