mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
ad13d9fbbe
Fix #52144.
20 lines
558 B
Plaintext
20 lines
558 B
Plaintext
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
|
|
help: consider making the field publicly accessible
|
|
|
|
|
LL | pub struct Bar(pub u8);
|
|
| +++
|
|
|
|
error: aborting due to previous error
|
|
|
|
For more information about this error, try `rustc --explain E0423`.
|