1 mod a { 2 struct Foo; new()3 impl Foo { pub fn new() {} } 4 enum Bar {} new()5 impl Bar { pub fn new() {} } 6 } 7 main()8 fn main() { 9 a::Foo::new(); 10 //~^ ERROR: struct `Foo` is private 11 a::Bar::new(); 12 //~^ ERROR: enum `Bar` is private 13 } 14