Skip to content

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

Merged
merged 7 commits into from
May 13, 2015
Merged

Add error explanation for E0317, E0154, E0259, E0260. #25267

merged 7 commits into from
May 13, 2015

Conversation

meqif
Copy link
Contributor

@meqif meqif commented May 10, 2015

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 } or type isize = i64. I decided against it, since the diagnostic message looks clear enough to me.

What do you think?

@rust-highfive
Copy link
Contributor

r? @pcwalton

(rust_highfive has picked a reviewer for you, use r? to override)

@meqif meqif changed the title Add error explanation for E0317. Add error explanation for E0317, E0154, E0259, E0260. May 10, 2015
Imports (`use` statements) are not allowed after non-item statements, such as
variable declarations and expression statements.

Wrong example:
Copy link
Contributor

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:".

@michaelsproul
Copy link
Contributor

Looks good!

@meqif
Copy link
Contributor Author

meqif commented May 11, 2015

Thanks for the feedback, Michael. 😄 I fixed those issues with the latest commits.

@alexcrichton
Copy link
Member

Nice, thanks @meqif!

@bors: r+ aa529ef

@pnkfelix
Copy link
Member

@bors rollup

steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 12, 2015
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?
Manishearth added a commit to Manishearth/rust that referenced this pull request May 12, 2015
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?
bors added a commit that referenced this pull request May 12, 2015
@bors bors merged commit aa529ef into rust-lang:master May 13, 2015
@meqif meqif deleted the explain_e0317 branch May 13, 2015 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants