-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add error explanation for E0317, E0154, E0259, E0260. #25267
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
Conversation
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
Imports (`use` statements) are not allowed after non-item statements, such as | ||
variable declarations and expression statements. | ||
|
||
Wrong example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this error message, but I think the "Wrong example" wording is a bit awkward (despite its incidence elsewhere). In this case you could maybe say "Here's an example that demonstrates the error:".
Looks good! |
Thanks for the feedback, Michael. 😄 I fixed those issues with the latest commits. |
@bors rollup |
Add diagnostic message for E0317, E0154, E0259 and E0260; part of rust-lang#24407. About E0317, I was unsure if I should add an example of what could be wrong, such as `struct i64`, `enum char { A, B }` or `type isize = i64`. I decided against it, since the diagnostic message looks clear enough to me. What do you think?
Add diagnostic message for E0317, E0154, E0259 and E0260; part of rust-lang#24407. About E0317, I was unsure if I should add an example of what could be wrong, such as `struct i64`, `enum char { A, B }` or `type isize = i64`. I decided against it, since the diagnostic message looks clear enough to me. What do you think?
Add diagnostic message for E0317, E0154, E0259 and E0260; part of #24407.
About E0317, I was unsure if I should add an example of what could be wrong, such as
struct i64
,enum char { A, B }
ortype isize = i64
. I decided against it, since the diagnostic message looks clear enough to me.What do you think?