1 mod a {
2     pub struct Foo {
3         pub x: isize
4     }
5 
6     impl Foo {
foo(&self)7         fn foo(&self) {}
8     }
9 }
10 
f()11 fn f() {
12     impl a::Foo {
13         fn bar(&self) {} // This should be visible outside `f`
14     }
15 }
16 
main()17 fn main() {
18     let s = a::Foo { x: 1 };
19     s.bar();
20     s.foo();    //~ ERROR associated function `foo` is private
21 }
22