Skip to content
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

A few fixes to lints and error messages #17215

Merged
merged 7 commits into from
Oct 3, 2014
Merged

A few fixes to lints and error messages #17215

merged 7 commits into from
Oct 3, 2014

Conversation

ftxqxd
Copy link
Contributor

@ftxqxd ftxqxd commented Sep 12, 2014

This updates the unused lint group to include more lints, updates the non_snake_case lint to give better suggestions, adds a note explaining why a lifetime cannot be elided, and tweaks various error messages. This also updates the non_uppercase_statics lint to be warn-by-default to match the other naming lints. For statics, this lint is particularly useful, because a non-uppercase static can easily collide with a pattern binding, resulting in very confusing errors.

Closes #15914.
Closes #15657.
Closes #17337.

@huonw
Copy link
Member

huonw commented Sep 13, 2014

The non-uppercase statics lint was originally warn by default, and was actually switched to allow because some people found it too annoying.

(Also, fwiw, it would've been nice to have that change in a separate commit, since it entails a lot of non-interesting mechanical changes, obscuring the 'core' of this PR.)

@huonw
Copy link
Member

huonw commented Sep 13, 2014

In fact there's a whole pile of unrelated changes here that should be in separate commits.

@ftxqxd
Copy link
Contributor Author

ftxqxd commented Sep 13, 2014

OK, I separated the changes into their own commits.

@ftxqxd
Copy link
Contributor Author

ftxqxd commented Sep 15, 2014

I just threw in a fix for #17263 because I think bors’s queue is full enough as it is, and it seems to fit in the scope of this PR quite nicely.

@alexcrichton
Copy link
Member

@P1start this looks great, thanks! As @huonw mentioned there's a lot of changes here, not all of which are entirely related. Can you please separate out changes like the borrowck ones to separate PRs? Also, can you make sure that there are tests for all issues fixed? I was unable to find one for #15657 for example.

@ftxqxd
Copy link
Contributor Author

ftxqxd commented Sep 17, 2014

I don’t think that #15657 can be tested because it relies on the order errors are output, which can’t be tested the normal way. Or is there some other kind of test which can match on error messages more directly?

So how many PRs would this need to be split into? I don’t want to make 11 different pull requests as that would obviously take some time to go through bors, so would something like this work:

  • borrowck error messages (commits 4, 5, 6, and 10)
  • Other error messages (commits 7, 8, and 9)
  • Lint fixes (commits 1, 2, 3, and 11)

? Or would the fixes need to be separated into finer-grained PRs?

@alexcrichton
Copy link
Member

I'm personally not super comfortable reviewing borrowck-related modifications, but the misc error messages and lints can probably be grouped together. Sorry for being a little slow to get back to you!

@ftxqxd
Copy link
Contributor Author

ftxqxd commented Sep 22, 2014

I’ve moved the borrowck-error-related changes into #17434.

bors added a commit that referenced this pull request Sep 22, 2014
This updates the `unused` lint group to include more lints, updates the `non_snake_case` lint to give better suggestions, adds a note explaining why a lifetime cannot be elided, and tweaks various error messages. This also updates the `non_uppercase_statics` lint to be warn-by-default to match the other naming lints. For statics, this lint is particularly useful, because a non-uppercase static can easily collide with a pattern binding, resulting in very confusing errors.

Closes #15914.
Closes #15657.
Closes #17337.
@ftxqxd
Copy link
Contributor Author

ftxqxd commented Oct 2, 2014

r? @alexcrichton

bors added a commit that referenced this pull request Oct 2, 2014
This was originally part of #17215.

Closes #15506.
Closes #15630.
Closes #17263.

This also partially implements #15838.
@ftxqxd
Copy link
Contributor Author

ftxqxd commented Oct 2, 2014

Ah, the test that failed always fails locally (among with some others), so I ignored it. :/ Should be fixed now. re-r?

@ftxqxd
Copy link
Contributor Author

ftxqxd commented Oct 3, 2014

Argh, the rollup made a merge conflict. Rebased, so once more, r?

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Oct 3, 2014
@bors bors merged commit a667a69 into rust-lang:master Oct 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants