We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I had a tuple-struct defined pub Line(f32, f32, f32, f32) and tried using it from another module without remembering to put pub on the fields.
pub Line(f32, f32, f32, f32)
pub
Nightly and Stable have very different error messages, and the stable message is much better.
error: tuple struct `Line` is private --> testsuite/src/main.rs:44:95 | 44 | let lines = evaluator.get_polylines(&result, &ctx).into_iter().map(|((x1, y1), (x2, y2))| formats::lines::Line(x1, y1, x2, y2)); | ^^^^^^^^^^^^^^^^^^^^
error[E0450]: cannot invoke tuple struct constructor with private fields --> testsuite/src/main.rs:44:95 | 44 | let lines = evaluator.get_polylines(&result, &ctx).into_iter().map(|((x1, y1), (x2, y2))| formats::lines::Line(x1, y1, x2, y2)); | ^^^^^^^^^^^^^^^^^^^^ cannot construct with a private field | ::: testsuite/src/formats.rs | 72 | pub struct Line(f32, f32, f32, f32); | ---- ---- ---- ---- private field declared here | | | | | | | private field declared here | | private field declared here | private field declared here
The text was updated successfully, but these errors were encountered:
Duplicate of #39703
Sorry, something went wrong.
No branches or pull requests
I had a tuple-struct defined
pub Line(f32, f32, f32, f32)
and tried using it from another module without remembering to putpub
on the fields.Nightly and Stable have very different error messages, and the stable message is much better.
Nightly and Beta
Stable
The text was updated successfully, but these errors were encountered: