1 2 3 4 5 6 7 8 9 10 11 12
mod inner { pub struct Foo; impl Foo { fn method(&self) {} } } fn main() { let foo = inner::Foo; foo.method(); //~ ERROR method `method` is private [E0624] }