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