about summary refs log tree commit diff
path: root/tests/ui/privacy/issue-75907.stderr
blob: 8a6484979c009e41870814ecf16a2fe8e032bdd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
error[E0532]: cannot match against a tuple struct which contains private fields
  --> $DIR/issue-75907.rs:15:9
   |
LL |     let Bar(x, y, Foo(z)) = make_bar();
   |         ^^^
   |
note: constructor is not visible here due to private fields
  --> $DIR/issue-75907.rs:15:16
   |
LL |     let Bar(x, y, Foo(z)) = make_bar();
   |                ^  ^^^^^^ private field
   |                |
   |                private field
help: consider making the fields publicly accessible
   |
LL -     pub(crate) struct Bar(pub u8, pub(in crate::foo) u8, Foo);
LL +     pub(crate) struct Bar(pub u8, pub u8, pub Foo);
   |

error[E0532]: cannot match against a tuple struct which contains private fields
  --> $DIR/issue-75907.rs:15:19
   |
LL |     let Bar(x, y, Foo(z)) = make_bar();
   |                   ^^^
   |
note: constructor is not visible here due to private fields
  --> $DIR/issue-75907.rs:15:23
   |
LL |     let Bar(x, y, Foo(z)) = make_bar();
   |                       ^ private field
help: consider making the field publicly accessible
   |
LL |     pub(crate) struct Foo(pub u8);
   |                           +++

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0532`.