about summary refs log tree commit diff
path: root/src/test/compile-fail/static-method-privacy.rs
blob: 0fd82b5ace3a7f12aaf10ccd1283e989f2f94ea7 (plain)
1
2
3
4
5
6
7
8
9
10
mod a {
    pub struct S;
    impl S {
        fn new() -> S { S }
    }
}

fn main() {
    let _ = a::S::new();    //~ ERROR function `new` is private
}