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 }