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