2020-10-26 14:36:48 +00:00
|
|
|
error[E0423]: cannot initialize a tuple struct which contains private fields
|
|
|
|
--> $DIR/issue-75906.rs:11:13
|
|
|
|
|
|
|
|
|
LL | let y = Bar(12);
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
note: constructor is not visible here due to private fields
|
|
|
|
--> $DIR/issue-75906.rs:4:20
|
|
|
|
|
|
|
|
|
LL | pub struct Bar(u8);
|
|
|
|
| ^^ private field
|
2023-01-08 01:15:28 +00:00
|
|
|
help: consider making the field publicly accessible
|
|
|
|
|
|
|
|
|
LL | pub struct Bar(pub u8);
|
|
|
|
| +++
|
2020-10-26 14:36:48 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2020-10-26 14:36:48 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0423`.
|