]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/pub-restricted.rs
Rollup merge of #79156 - jyn514:relative-llvm, r=Mark-Simulacrum
[rust.git] / src / test / rustdoc / pub-restricted.rs
1 // compile-flags: --document-private-items
2
3 #![feature(crate_visibility_modifier)]
4
5 #![crate_name = "foo"]
6
7 // @has 'foo/struct.FooPublic.html' '//pre' 'pub struct FooPublic'
8 pub struct FooPublic;
9 // @has 'foo/struct.FooJustCrate.html' '//pre' 'pub(crate) struct FooJustCrate'
10 crate struct FooJustCrate;
11 // @has 'foo/struct.FooPubCrate.html' '//pre' 'pub(crate) struct FooPubCrate'
12 pub(crate) struct FooPubCrate;
13 // @has 'foo/struct.FooSelf.html' '//pre' 'pub(crate) struct FooSelf'
14 pub(self) struct FooSelf;
15 // @has 'foo/struct.FooInSelf.html' '//pre' 'pub(crate) struct FooInSelf'
16 pub(in self) struct FooInSelf;
17 mod a {
18     // @has 'foo/a/struct.FooSuper.html' '//pre' 'pub(crate) struct FooSuper'
19     pub(super) struct FooSuper;
20     // @has 'foo/a/struct.FooInSuper.html' '//pre' 'pub(crate) struct FooInSuper'
21     pub(in super) struct FooInSuper;
22     // @has 'foo/a/struct.FooInA.html' '//pre' 'pub(in a) struct FooInA'
23     pub(in a) struct FooInA;
24     mod b {
25         // @has 'foo/a/b/struct.FooInSelfSuperB.html' '//pre' 'pub(in a::b) struct FooInSelfSuperB'
26         pub(in a::b) struct FooInSelfSuperB;
27         // @has 'foo/a/b/struct.FooInSuperSuper.html' '//pre' 'pub(crate) struct FooInSuperSuper'
28         pub(in super::super) struct FooInSuperSuper;
29         // @has 'foo/a/b/struct.FooInAB.html' '//pre' 'pub(in a::b) struct FooInAB'
30         pub(in a::b) struct FooInAB;
31     }
32 }