1 2 3 4 5 6 7 8 9 10 11 12 13 14
mod a { pub struct Foo { x: u32, } impl Foo { pub fn new() -> Foo { Foo { x: 0 } } } } fn main() { let f = a::Foo::new(); f.x; //~ ERROR E0616 }