2013-08-07 02:11:34 -05:00
|
|
|
// aux-build:static_priv_by_default.rs
|
|
|
|
|
2014-02-14 12:10:06 -06:00
|
|
|
extern crate static_priv_by_default;
|
2013-08-07 02:11:34 -05:00
|
|
|
|
|
|
|
mod child {
|
|
|
|
pub mod childs_child {
|
2015-01-08 04:54:35 -06:00
|
|
|
static private: isize = 0;
|
|
|
|
pub static public: isize = 0;
|
2013-08-07 02:11:34 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-08 04:54:35 -06:00
|
|
|
fn foo(_: isize) {}
|
2013-08-07 02:11:34 -05:00
|
|
|
|
|
|
|
fn full_ref() {
|
2013-10-05 16:44:37 -05:00
|
|
|
foo(static_priv_by_default::private); //~ ERROR: static `private` is private
|
2013-08-07 02:11:34 -05:00
|
|
|
foo(static_priv_by_default::public);
|
2013-10-05 16:44:37 -05:00
|
|
|
foo(child::childs_child::private); //~ ERROR: static `private` is private
|
2013-08-07 02:11:34 -05:00
|
|
|
foo(child::childs_child::public);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn medium_ref() {
|
|
|
|
use child::childs_child;
|
2013-10-05 16:44:37 -05:00
|
|
|
foo(childs_child::private); //~ ERROR: static `private` is private
|
2013-08-07 02:11:34 -05:00
|
|
|
foo(childs_child::public);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|