-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
E0613 needs to be merged into E0609 now #42945
Comments
Makes sense to me! |
Here are some brief mentoring instructions:
|
Hi! I'd like to take this issue, if no one minds? |
Go right ahead! Let us know if you'd like additional instructions and we'll try to connect you with @nikomatsakis or someone else from the compiler team. |
Or I can as well since I'm the one who added these two error codes. |
While I'm at it, E0612 looks like it could be folded into E0609 too. Should I go ahead and do that? |
I can be, not sure whether it should. It seems we can actually recognize when we have a tuple struct, so we won't generate the error if it is wrongly placed. However it might be against the spirit of the RFC. @petrochenkov as author of the RFC, what do you think, should E0612 be merged into E0609? |
@est31 |
Should unused diagnostic codes just be removed, or commented out with a reference that the diagnostic has been folded into another? EDIT: For now, left a comment that they have been merged into E0609 |
Resolves rust-lang#42945
With RFC 1506 merged and stabilized, handling
E0613
separate fromE0609
is not the correct behaviour any more.For context, you get
E0613
when doing something likelet _ = "hi".0;
:And you get
E0609
when doing something likelet _ = "hi".foo;
:RFC 1506 "clarified ADT kinds" (Rendered, tracking issue) allowed all structs to contain fields with integral names like
0
or1
, etc. This makes the error message forE0613
outdated, as the type may be a non tuple struct, and calling0
a "tuple index" sounds wrong as well.So I propose
E0613
to be merged intoE0609
, asE0609
is now better suiting, and also because its "in the spirit" of the RFC.The proposed new output for
let _ = "hi".0;
is:The text was updated successfully, but these errors were encountered: