]> git.proxmox.com Git - rustc.git/blob - src/test/ui/privacy/private-struct-field-pattern.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.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 }