2013-08-07 00:11:34 -07:00
|
|
|
//@ aux-build:static_priv_by_default.rs
|
|
|
|
|
2014-02-14 10:10:06 -08:00
|
|
|
extern crate static_priv_by_default;
|
2013-08-07 00:11:34 -07:00
|
|
|
|
|
|
|
mod child {
|
|
|
|
pub mod childs_child {
|
2015-01-08 21:54:35 +11:00
|
|
|
static private: isize = 0;
|
|
|
|
pub static public: isize = 0;
|
2013-08-07 00:11:34 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-10-05 14:44:37 -07:00
|
|
|
fn foo<T>(_: T) {}
|
|
|
|
|
|
|
|
fn test1() {
|
|
|
|
use child::childs_child::private;
|
|
|
|
//~^ ERROR: static `private` is private
|
2013-08-07 00:11:34 -07:00
|
|
|
use child::childs_child::public;
|
2013-10-05 14:44:37 -07:00
|
|
|
|
|
|
|
foo(private);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn test2() {
|
|
|
|
use static_priv_by_default::private;
|
|
|
|
//~^ ERROR: static `private` is private
|
|
|
|
use static_priv_by_default::public;
|
|
|
|
|
|
|
|
foo(private);
|
2013-08-07 00:11:34 -07:00
|
|
|
}
|
2013-10-05 14:44:37 -07:00
|
|
|
|
|
|
|
fn main() {}
|