-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Elide use of "non-existing" fields for enum variant with parse errors #57361
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
Comments
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 19, 2019
…etrochenkov Do not complain about non-existing fields after parse recovery When failing to parse struct-like enum variants, the ADT gets recorded as having no fields. Record that we have actually recovered during parsing of this variant to avoid complaing about non-existing fields when actually using it. Fix rust-lang#57361.
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
Mar 22, 2019
…etrochenkov Do not complain about non-existing fields after parse recovery When failing to parse struct-like enum variants, the ADT gets recorded as having no fields. Record that we have actually recovered during parsing of this variant to avoid complaing about non-existing fields when actually using it. Fix rust-lang#57361.
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 22, 2019
…etrochenkov Do not complain about non-existing fields after parse recovery When failing to parse struct-like enum variants, the ADT gets recorded as having no fields. Record that we have actually recovered during parsing of this variant to avoid complaing about non-existing fields when actually using it. Fix rust-lang#57361.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On parse error of the fields of an enum variant, we also emit an error about "non-existing" fields when using the variant. We have no way of actually knowing wether those fields exist, we should elide the second error:
The text was updated successfully, but these errors were encountered: