]> git.lizzy.rs Git - rust.git/blob - tests/ui/privacy/issue-75907.stderr
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / privacy / issue-75907.stderr
1 error[E0532]: cannot match against a tuple struct which contains private fields
2   --> $DIR/issue-75907.rs:15:9
3    |
4 LL |     let Bar(x, y, Foo(z)) = make_bar();
5    |         ^^^
6    |
7 note: constructor is not visible here due to private fields
8   --> $DIR/issue-75907.rs:15:16
9    |
10 LL |     let Bar(x, y, Foo(z)) = make_bar();
11    |                ^  ^^^^^^ private field
12    |                |
13    |                private field
14 help: consider making the fields publicly accessible
15    |
16 LL |     pub(crate) struct Bar(pub u8, pub u8, pub Foo);
17    |                           ~~~     ~~~     +++
18
19 error[E0532]: cannot match against a tuple struct which contains private fields
20   --> $DIR/issue-75907.rs:15:19
21    |
22 LL |     let Bar(x, y, Foo(z)) = make_bar();
23    |                   ^^^
24    |
25 note: constructor is not visible here due to private fields
26   --> $DIR/issue-75907.rs:15:23
27    |
28 LL |     let Bar(x, y, Foo(z)) = make_bar();
29    |                       ^ private field
30 help: consider making the field publicly accessible
31    |
32 LL |     pub(crate) struct Foo(pub u8);
33    |                           +++
34
35 error: aborting due to 2 previous errors
36
37 For more information about this error, try `rustc --explain E0532`.