File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Regression test for <https://github.com/rust-lang/rust/issues/126796>.
2
+ // `doc(hidden)` should still be able to hide extern crates, only the local crates
3
+ // cannot be hidden because we still need to generate its `index.html` file.
4
+
5
+ #![ crate_name = "foo" ]
6
+ #![ doc( hidden) ]
7
+
8
+ //@ has 'foo/index.html'
9
+ // First we check that the page contains the crate name (`foo`).
10
+ //@ has - '//*' 'foo'
11
+ // But doesn't contain any of the other items.
12
+ //@ !has - '//*' 'other'
13
+ //@ !has - '//*' 'marker'
14
+ //@ !has - '//*' 'PhantomData'
15
+
16
+ #[ doc( inline) ]
17
+ pub use std as other;
18
+
19
+ #[ doc( inline) ]
20
+ pub use std:: marker;
21
+
22
+ #[ doc( inline) ]
23
+ pub use std:: marker:: PhantomData ;
24
+
25
+ //@ !has - '//*' 'myself'
26
+ #[ doc( inline) ]
27
+ pub use crate as myself;
You can’t perform that action at this time.
0 commit comments