about summary refs log tree commit diff
path: root/tests/ui/privacy/private-inferred-type-2.rs
blob: f9cdfe23cab2ee5e30836e9d83d61c4ed0261096 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//@ aux-build:private-inferred-type.rs
#![allow(private_interfaces)]

extern crate private_inferred_type as ext;

mod m {
    struct Priv;
    pub struct Pub<T>(pub T);

    impl Pub<Priv> {
        pub fn get_priv() -> Priv { Priv }
        pub fn static_method() {}
    }
}

fn main() {
    m::Pub::get_priv; //~ ERROR type `Priv` is private
    m::Pub::static_method; //~ ERROR type `Priv` is private
    ext::Pub::static_method; //~ ERROR type `ext::Priv` is private
}