rust/src/test/ui/static/static-method-privacy.rs
2020-03-12 15:47:36 -05:00

10 lines
165 B
Rust

mod a {
pub struct S;
impl S {
fn new() -> S { S }
}
}
fn main() {
let _ = a::S::new(); //~ ERROR associated function `new` is private
}