2020-10-26 09:36:48 -05:00
|
|
|
error[E0532]: cannot match against a tuple struct which contains private fields
|
2020-09-08 17:14:09 -05:00
|
|
|
--> $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
|
2023-01-07 19:15:28 -06:00
|
|
|
help: consider making the fields publicly accessible
|
|
|
|
|
|
|
|
|
LL | pub(crate) struct Bar(pub u8, pub u8, pub Foo);
|
|
|
|
| ~~~ ~~~ +++
|
2020-09-08 17:14:09 -05:00
|
|
|
|
2020-10-26 09:36:48 -05:00
|
|
|
error[E0532]: cannot match against a tuple struct which contains private fields
|
2020-09-08 17:14:09 -05:00
|
|
|
--> $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
|
2023-01-07 19:15:28 -06:00
|
|
|
help: consider making the field publicly accessible
|
|
|
|
|
|
|
|
|
LL | pub(crate) struct Foo(pub u8);
|
|
|
|
| +++
|
2020-09-08 17:14:09 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0532`.
|