-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 messages when using ADT constructor as value #82083
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-inconsistent
Diagnostics: Inconsistency in formatting, grammar or style between diagnostic messages.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
estebank
added
A-diagnostics
Area: Messages for errors, warnings, and lints
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
D-inconsistent
Diagnostics: Inconsistency in formatting, grammar or style between diagnostic messages.
labels
Feb 14, 2021
I'm gonna try to take a shot at this. |
Can I throw in this one? mod inner {
pub struct BadStruct {
_field: (),
}
}
fn main() {
let _ = inner::BadStruct();
} suggests the following, which won't work because the field is private:
|
mhm, stayed away from there because it talks about tuple structs and crates, but it's probably really the same thing 👍 |
Sorry for the inactivity. I'm going to let someone else work on this for now, I think. |
Current output:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-inconsistent
Diagnostics: Inconsistency in formatting, grammar or style between diagnostic messages.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given:
we currently emit
which is reasonable, particularly the suggestions, but it isn't entirely clear to a newcomer that
S
in TypeNS isn't the same asS
in ValueNS.Ideally, the output would look closer to:
The text was updated successfully, but these errors were encountered: