summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy/privacy-in-paths.rs
blob: 9cee2b89dd536bb633b69cec031f4624b23959f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
mod foo {
    pub use self::bar::S;
    mod bar {
        pub struct S;
        pub use baz;
    }

    trait T {
        type Assoc;
    }
    impl T for () {
        type Assoc = S;
    }
}

impl foo::S {
    fn f() {}
}

pub mod baz {
    fn f() {}

    fn g() {
        ::foo::bar::baz::f(); //~ERROR module `bar` is private
        ::foo::bar::S::f(); //~ERROR module `bar` is private
        <() as ::foo::T>::Assoc::f(); //~ERROR trait `T` is private
    }
}

fn main() {}