1 use a::Foo;
2 
3 mod a {
4     pub struct Foo {
5         x: isize
6     }
7 
make() -> Foo8     pub fn make() -> Foo {
9         Foo { x: 3 }
10     }
11 }
12 
main()13 fn main() {
14     match a::make() {
15         Foo { x: _ } => {}  //~ ERROR field `x` of struct `Foo` is private
16     }
17 }
18