1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // ignore-tidy-linelength
13 // compile-flags: --document-private-items
15 #![feature(crate_visibility_modifier)]
17 #![crate_name = "foo"]
19 // @has 'foo/struct.FooPublic.html' '//pre' 'pub struct FooPublic'
21 // @has 'foo/struct.FooJustCrate.html' '//pre' 'pub(crate) struct FooJustCrate'
22 crate struct FooJustCrate;
23 // @has 'foo/struct.FooPubCrate.html' '//pre' 'pub(crate) struct FooPubCrate'
24 pub(crate) struct FooPubCrate;
25 // @has 'foo/struct.FooSelf.html' '//pre' 'pub(self) struct FooSelf'
26 pub(self) struct FooSelf;
27 // @has 'foo/struct.FooInSelf.html' '//pre' 'pub(self) struct FooInSelf'
28 pub(in self) struct FooInSelf;
30 // @has 'foo/a/struct.FooSuper.html' '//pre' 'pub(super) struct FooSuper'
31 pub(super) struct FooSuper;
32 // @has 'foo/a/struct.FooInSuper.html' '//pre' 'pub(super) struct FooInSuper'
33 pub(in super) struct FooInSuper;
34 // @has 'foo/a/struct.FooInA.html' '//pre' 'pub(in a) struct FooInA'
35 pub(in a) struct FooInA;
37 // @has 'foo/a/b/struct.FooInSelfSuperB.html' '//pre' 'pub(in self::super::b) struct FooInSelfSuperB'
38 pub(in self::super::b) struct FooInSelfSuperB;
39 // @has 'foo/a/b/struct.FooInSuperSuper.html' '//pre' 'pub(in super::super) struct FooInSuperSuper'
40 pub(in super::super) struct FooInSuperSuper;
41 // @has 'foo/a/b/struct.FooInAB.html' '//pre' 'pub(in a::b) struct FooInAB'
42 pub(in a::b) struct FooInAB;