-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
E0599 assumes associated items of enums are variants #56517
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
Comments
Previous discussions: #28972, #46024 (comment) |
Current output has changed slightly:
Now it is even worse because the suggestion points at the wrong span, so when applied it creates incorrect code :-( |
cramertj
added a commit
to cramertj/rust
that referenced
this issue
Apr 11, 2019
…idtwco improve unknown enum variant errors Fixes rust-lang#56517.
Centril
added a commit
to Centril/rust
that referenced
this issue
Apr 12, 2019
…idtwco improve unknown enum variant errors Fixes rust-lang#56517.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Produces the error messages
I would expect the message to read "variant or associated item" instead of just "variant". The current message is confusing; it could lead users to believe the compiler is expecting to see a variant, and would not allow functions, in the context where the error occurred (note that no spelling suggestion is given if the item is from a trait, furthering the confusion).
Playground
The text was updated successfully, but these errors were encountered: