fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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