]> git.lizzy.rs Git - rust.git/blob - src/test/auxiliary/static_priv_by_default.rs
Rollup merge of #28991 - goyox86:goyox86/rustfmting-liblog-II, r=alexcrichton
[rust.git] / src / test / auxiliary / static_priv_by_default.rs
1 // Copyright 2013 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.
4 //
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.
10
11 #![crate_type = "lib"]
12
13 static private: isize = 0;
14 pub static public: isize = 0;
15
16 pub struct A(());
17
18 impl A {
19     fn foo() {}
20 }
21
22 mod foo {
23     pub static a: isize = 0;
24     pub fn b() {}
25     pub struct c;
26     pub enum d {}
27     pub type e = isize;
28
29     pub struct A(());
30
31     impl A {
32         fn foo() {}
33     }
34
35     // these are public so the parent can reexport them.
36     pub static reexported_a: isize = 0;
37     pub fn reexported_b() {}
38     pub struct reexported_c;
39     pub enum reexported_d {}
40     pub type reexported_e = isize;
41 }
42
43 pub mod bar {
44     pub use foo::reexported_a as e;
45     pub use foo::reexported_b as f;
46     pub use foo::reexported_c as g;
47     pub use foo::reexported_d as h;
48     pub use foo::reexported_e as i;
49 }
50
51 pub static a: isize = 0;
52 pub fn b() {}
53 pub struct c;
54 pub enum d {}
55 pub type e = isize;
56
57 static j: isize = 0;
58 fn k() {}
59 struct l;
60 enum m {}
61 type n = isize;