|
1 | 1 | // compile-flags: --document-private-items
|
2 | 2 |
|
| 3 | +#![feature(crate_visibility_modifier)] |
| 4 | + |
3 | 5 | #![crate_name = "foo"]
|
4 | 6 |
|
5 |
| -// @has 'foo/fn.foo.html' '//pre' 'fn foo' |
6 |
| -// !@has 'foo/fn.foo.html' '//pre' 'pub' |
7 |
| -fn foo() {} |
| 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 | +// @has 'foo/struct.FooPriv.html' '//pre' 'pub(crate) struct FooPriv' |
| 18 | +struct FooPriv; |
| 19 | + |
| 20 | +mod a { |
| 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 | + pub(in a) struct FooAInA; |
| 27 | + // @has 'foo/a/struct.FooAPriv.html' '//pre' 'struct FooAPriv' |
| 28 | + struct FooAPriv; |
8 | 29 |
|
9 |
| -mod bar { |
10 |
| - // @has 'foo/bar/fn.baz.html' '//pre' 'fn baz' |
11 |
| - // !@has 'foo/bar/fn.baz.html' '//pre' 'pub' |
12 |
| - fn baz() {} |
| 30 | + mod b { |
| 31 | + // @has 'foo/a/b/struct.FooBSuper.html' '//pre' 'pub(super) struct FooBSuper' |
| 32 | + pub(super) struct FooBSuper; |
| 33 | + // @has 'foo/a/b/struct.FooBInSuperSuper.html' '//pre' 'pub(crate) struct FooBInSuperSuper' |
| 34 | + pub(in super::super) struct FooBInSuperSuper; |
| 35 | + // @has 'foo/a/b/struct.FooBInAB.html' '//pre' 'struct FooBInAB' |
| 36 | + pub(in a::b) struct FooBInAB; |
| 37 | + // @has 'foo/a/b/struct.FooBPriv.html' '//pre' 'struct FooBPriv' |
| 38 | + struct FooBPriv; |
| 39 | + } |
13 | 40 | }
|
0 commit comments