]> git.lizzy.rs Git - rust.git/blob - src/test/ui/privacy/private-struct-field-pattern.rs
update ui tests
[rust.git] / src / test / ui / privacy / private-struct-field-pattern.rs
1 use a::Foo;
2
3 mod a {
4     pub struct Foo {
5         x: isize
6     }
7
8     pub fn make() -> Foo {
9         Foo { x: 3 }
10     }
11 }
12
13 fn main() {
14     match a::make() {
15         Foo { x: _ } => {}  //~ ERROR field `x` of struct `a::Foo` is private
16     }
17 }