File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ #![ no_std]
2
+
3
+ // Without `--document-hidden-items`,
4
+ // none of these items are present in rustdoc JSON.
5
+
6
+ //@ !has "$.index[?(@.name=='func')]"
7
+ #[ doc( hidden) ]
8
+ pub fn func ( ) { }
9
+
10
+ //@ !has "$.index[?(@.name=='Unit')]"
11
+ #[ doc( hidden) ]
12
+ pub struct Unit ;
13
+
14
+ //@ !has "$.index[?(@.name=='hidden')]"
15
+ #[ doc( hidden) ]
16
+ pub mod hidden {
17
+ //@ !has "$.index[?(@.name=='Inner')]"
18
+ pub struct Inner ;
19
+ }
Original file line number Diff line number Diff line change
1
+ //@ compile-flags: --document-hidden-items
2
+ #![ no_std]
3
+
4
+ //@ is "$.index[?(@.name=='func')].attrs" '["#[doc(hidden)]"]'
5
+ #[ doc( hidden) ]
6
+ pub fn func ( ) { }
7
+
8
+ //@ is "$.index[?(@.name=='Unit')].attrs" '["#[doc(hidden)]"]'
9
+ #[ doc( hidden) ]
10
+ pub struct Unit ;
11
+
12
+ //@ is "$.index[?(@.name=='hidden')].attrs" '["#[doc(hidden)]"]'
13
+ #[ doc( hidden) ]
14
+ pub mod hidden {
15
+ //@ is "$.index[?(@.name=='Inner')].attrs" '[]'
16
+ pub struct Inner ;
17
+ }
You can’t perform that action at this time.
0 commit comments