]> git.lizzy.rs Git - rust.git/blob - src/test/ui/static/static-priv-by-default2.rs
Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholk
[rust.git] / src / test / ui / static / static-priv-by-default2.rs
1 // aux-build:static_priv_by_default.rs
2
3 extern crate static_priv_by_default;
4
5 mod child {
6     pub mod childs_child {
7         static private: isize = 0;
8         pub static public: isize = 0;
9     }
10 }
11
12 fn foo<T>(_: T) {}
13
14 fn test1() {
15     use child::childs_child::private;
16     //~^ ERROR: static `private` is private
17     use child::childs_child::public;
18
19     foo(private);
20 }
21
22 fn test2() {
23     use static_priv_by_default::private;
24     //~^ ERROR: static `private` is private
25     use static_priv_by_default::public;
26
27     foo(private);
28 }
29
30 fn main() {}