-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
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
Better error message when attempting to instantiate tuple structs with private fields #58017
Comments
How about?:
|
in addition to @Centril 's proposal, it should locate the exact position of the private fields: struct Foo(pub i32, i32, pub i32, i32);
^^^ ^^^ |
Is there a good reason why the three test cases give completely different error messages? |
This is actually a regression from 1.16:
|
ping on this, which still reproduces. |
cc @petrochenkov as this overlaps with a lot of the work he's been doing. |
triage: I personally don't think this should be P-high, as in I don't think it should be part of the triage docket for T-compiler every week. But I won't downgrade it yet. First, lets tag it as E-needs-mentor, and see if anyone steps up to provide instructions for a solution here. |
Posted a PR to fix this - #65153. |
Duplicate of #39703 |
Given
we emit
which is confusing and inconsistent with the same error in a regular struct:
This has confused users in the past. CC #57951 and #52144, which are somewhat related.
The text was updated successfully, but these errors were encountered: