1 // compile-flags: --document-private-items
3 #![feature(crate_visibility_modifier)]
7 // @has 'foo/struct.FooPublic.html' '//pre' '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 // @has 'foo/struct.FooPriv.html' '//pre' 'pub(crate) struct FooPriv'
21 // @has 'foo/a/struct.FooASuper.html' '//pre' 'pub(crate) struct FooASuper'
22 pub(super) struct FooASuper;
23 // @has 'foo/a/struct.FooAInSuper.html' '//pre' 'pub(crate) struct FooAInSuper'
24 pub(in super) struct FooAInSuper;
25 // @has 'foo/a/struct.FooAInA.html' '//pre' 'struct FooAInA'
26 // @!has 'foo/a/struct.FooAInA.html' '//pre' 'pub'
27 pub(in a) struct FooAInA;
28 // @has 'foo/a/struct.FooAPriv.html' '//pre' 'struct FooAPriv'
29 // @!has 'foo/a/struct.FooAPriv.html' '//pre' 'pub'
33 // @has 'foo/a/b/struct.FooBSuper.html' '//pre' 'pub(super) struct FooBSuper'
34 pub(super) struct FooBSuper;
35 // @has 'foo/a/b/struct.FooBInSuperSuper.html' '//pre' 'pub(crate) struct FooBInSuperSuper'
36 pub(in super::super) struct FooBInSuperSuper;
37 // @has 'foo/a/b/struct.FooBInAB.html' '//pre' 'struct FooBInAB'
38 // @!has 'foo/a/b/struct.FooBInAB.html' '//pre' 'pub'
39 pub(in a::b) struct FooBInAB;
40 // @has 'foo/a/b/struct.FooBPriv.html' '//pre' 'struct FooBPriv'
41 // @!has 'foo/a/b/struct.FooBPriv.html' '//pre' 'pub'
46 // @has 'foo/trait.PubTrait.html' '//pre' 'pub trait PubTrait'
48 // @has 'foo/trait.PubTrait.html' '//pre' 'type Type;'
49 // @!has 'foo/trait.PubTrait.html' '//pre' 'pub type Type;'
51 // @has 'foo/trait.PubTrait.html' '//pre' 'const CONST: usize;'
52 // @!has 'foo/trait.PubTrait.html' '//pre' 'pub const CONST: usize;'
54 // @has 'foo/trait.PubTrait.html' '//pre' 'fn function();'
55 // @!has 'foo/trait.PubTrait.html' '//pre' 'pub fn function();'
63 // @has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'type Type'
64 // @!has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'pub type Type'
66 // @has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'const CONST: usize'
67 // @!has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'pub const CONST: usize'
69 // @has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'fn function()'
70 // @!has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'pub fn function()'
72 impl PubTrait for FooPublic {
74 const CONST: usize = 0;