]> git.lizzy.rs Git - rust.git/blob - src/test/ui/privacy/private-struct-field-pattern.rs
Merge commit 'cd4810de42c57b64b74dae09c530a4c3a41f87b9' into libgccjit-codegen
[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 `Foo` is private
16     }
17 }