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

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