aboutsummaryrefslogtreecommitdiff
path: root/lazy-static/compiletest/tests/compile-fail/static_is_private.rs
blob: 6ebc8f55c20a6f5ede98e0f39dd2a9aeb546c50b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[macro_use]
extern crate lazy_static_compiletest as lazy_static;

mod outer {
    pub mod inner {
        lazy_static! {
            pub(in outer) static ref FOO: () = ();
        }
    }
}

fn main() {
    assert_eq!(*outer::inner::FOO, ()); //~ ERROR static `FOO` is private
}