]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/reexports-priv.rs
84ea4ad2c9ef30ea8fbb08b948661821ce29cbbe
[rust.git] / tests / rustdoc / reexports-priv.rs
1 // aux-build: reexports.rs
2 // compile-flags: --document-private-items
3
4 #![crate_name = "foo"]
5
6 extern crate reexports;
7
8 // @has 'foo/macro.addr_of.html' '//*[@class="rust item-decl"]' 'pub macro addr_of($place:expr) {'
9 pub use reexports::addr_of;
10 // @!has 'foo/macro.addr_of_crate.html'
11 pub(crate) use reexports::addr_of_crate;
12 // @!has 'foo/macro.addr_of_self.html'
13 pub(self) use reexports::addr_of_self;
14 // @!has 'foo/macro.addr_of_local.html'
15 use reexports::addr_of_local;
16
17 // @has 'foo/struct.Foo.html' '//*[@class="rust item-decl"]' 'pub struct Foo;'
18 pub use reexports::Foo;
19 // @!has 'foo/struct.FooCrate.html'
20 pub(crate) use reexports::FooCrate;
21 // @!has 'foo/struct.FooSelf.html'
22 pub(self) use reexports::FooSelf;
23 // @!has 'foo/struct.FooLocal.html'
24 use reexports::FooLocal;
25
26 // @has 'foo/enum.Bar.html' '//*[@class="rust item-decl"]' 'pub enum Bar {'
27 pub use reexports::Bar;
28 // @!has 'foo/enum.BarCrate.html'
29 pub(crate) use reexports::BarCrate;
30 // @!has 'foo/enum.BarSelf.html'
31 pub(self) use reexports::BarSelf;
32 // @!has 'foo/enum.BarLocal.html'
33 use reexports::BarLocal;
34
35 // @has 'foo/fn.foo.html' '//pre[@class="rust item-decl"]' 'pub fn foo()'
36 pub use reexports::foo;
37 // @!has 'foo/fn.foo_crate.html'
38 pub(crate) use reexports::foo_crate;
39 // @!has 'foo/fn.foo_self.html'
40 pub(self) use reexports::foo_self;
41 // @!has 'foo/fn.foo_local.html'
42 use reexports::foo_local;
43
44 // @has 'foo/type.Type.html' '//pre[@class="rust item-decl"]' 'pub type Type ='
45 pub use reexports::Type;
46 // @!has 'foo/type.TypeCrate.html'
47 pub(crate) use reexports::TypeCrate;
48 // @!has 'foo/type.TypeSelf.html'
49 pub(self) use reexports::TypeSelf;
50 // @!has 'foo/type.TypeLocal.html'
51 use reexports::TypeLocal;
52
53 // @has 'foo/union.Union.html' '//*[@class="rust item-decl"]' 'pub union Union {'
54 pub use reexports::Union;
55 // @!has 'foo/union.UnionCrate.html'
56 pub(crate) use reexports::UnionCrate;
57 // @!has 'foo/union.UnionSelf.html'
58 pub(self) use reexports::UnionSelf;
59 // @!has 'foo/union.UnionLocal.html'
60 use reexports::UnionLocal;
61
62 pub mod outer {
63     pub mod inner {
64         // @has 'foo/outer/inner/macro.addr_of.html' '//*[@class="rust item-decl"]' 'pub macro addr_of($place:expr) {'
65         pub use reexports::addr_of;
66         // @has 'foo/outer/inner/macro.addr_of_crate.html' '//*[@class="rust item-decl"]' 'pub(crate) macro addr_of_crate($place:expr) {'
67         pub(crate) use reexports::addr_of_crate;
68         // @has 'foo/outer/inner/macro.addr_of_super.html' '//*[@class="rust item-decl"]' 'pub(in outer) macro addr_of_super($place:expr) {'
69         pub(super) use reexports::addr_of_super;
70         // @!has 'foo/outer/inner/macro.addr_of_self.html'
71         pub(self) use reexports::addr_of_self;
72         // @!has 'foo/outer/inner/macro.addr_of_local.html'
73         use reexports::addr_of_local;
74
75         // @has 'foo/outer/inner/struct.Foo.html' '//*[@class="rust item-decl"]' 'pub struct Foo;'
76         pub use reexports::Foo;
77         // @has 'foo/outer/inner/struct.FooCrate.html' '//*[@class="rust item-decl"]' 'pub(crate) struct FooCrate;'
78         pub(crate) use reexports::FooCrate;
79         // @has 'foo/outer/inner/struct.FooSuper.html' '//*[@class="rust item-decl"]' 'pub(in outer) struct FooSuper;'
80         pub(super) use reexports::FooSuper;
81         // @!has 'foo/outer/inner/struct.FooSelf.html'
82         pub(self) use reexports::FooSelf;
83         // @!has 'foo/outer/inner/struct.FooLocal.html'
84         use reexports::FooLocal;
85
86         // @has 'foo/outer/inner/enum.Bar.html' '//*[@class="rust item-decl"]' 'pub enum Bar {'
87         pub use reexports::Bar;
88         // @has 'foo/outer/inner/enum.BarCrate.html' '//*[@class="rust item-decl"]' 'pub(crate) enum BarCrate {'
89         pub(crate) use reexports::BarCrate;
90         // @has 'foo/outer/inner/enum.BarSuper.html' '//*[@class="rust item-decl"]' 'pub(in outer) enum BarSuper {'
91         pub(super) use reexports::BarSuper;
92         // @!has 'foo/outer/inner/enum.BarSelf.html'
93         pub(self) use reexports::BarSelf;
94         // @!has 'foo/outer/inner/enum.BarLocal.html'
95         use reexports::BarLocal;
96
97         // @has 'foo/outer/inner/fn.foo.html' '//pre[@class="rust item-decl"]' 'pub fn foo()'
98         pub use reexports::foo;
99         // @has 'foo/outer/inner/fn.foo_crate.html' '//pre[@class="rust item-decl"]' 'pub(crate) fn foo_crate()'
100         pub(crate) use reexports::foo_crate;
101         // @has 'foo/outer/inner/fn.foo_super.html' '//pre[@class="rust item-decl"]' 'pub(in outer) fn foo_super()'
102         pub(super) use::reexports::foo_super;
103         // @!has 'foo/outer/inner/fn.foo_self.html'
104         pub(self) use reexports::foo_self;
105         // @!has 'foo/outer/inner/fn.foo_local.html'
106         use reexports::foo_local;
107
108         // @has 'foo/outer/inner/type.Type.html' '//pre[@class="rust item-decl"]' 'pub type Type ='
109         pub use reexports::Type;
110         // @has 'foo/outer/inner/type.TypeCrate.html' '//pre[@class="rust item-decl"]' 'pub(crate) type TypeCrate ='
111         pub(crate) use reexports::TypeCrate;
112         // @has 'foo/outer/inner/type.TypeSuper.html' '//pre[@class="rust item-decl"]' 'pub(in outer) type TypeSuper ='
113         pub(super) use reexports::TypeSuper;
114         // @!has 'foo/outer/inner/type.TypeSelf.html'
115         pub(self) use reexports::TypeSelf;
116         // @!has 'foo/outer/inner/type.TypeLocal.html'
117         use reexports::TypeLocal;
118
119         // @has 'foo/outer/inner/union.Union.html' '//*[@class="rust item-decl"]' 'pub union Union {'
120         pub use reexports::Union;
121         // @has 'foo/outer/inner/union.UnionCrate.html' '//*[@class="rust item-decl"]' 'pub(crate) union UnionCrate {'
122         pub(crate) use reexports::UnionCrate;
123         // @has 'foo/outer/inner/union.UnionSuper.html' '//*[@class="rust item-decl"]' 'pub(in outer) union UnionSuper {'
124         pub(super) use reexports::UnionSuper;
125         // @!has 'foo/outer/inner/union.UnionSelf.html'
126         pub(self) use reexports::UnionSelf;
127         // @!has 'foo/outer/inner/union.UnionLocal.html'
128         use reexports::UnionLocal;
129     }
130 }
131
132 mod re_re_exports {
133         // @!has 'foo/re_re_exports/union.Union.html'
134         use crate::reexports::Union;
135 }