-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Add several lints into unused
lint group
#45424
Conversation
@@ -140,8 +140,7 @@ impl<'a, 'gcx> CheckCrateVisitor<'a, 'gcx> { | |||
self.tcx.lint_node(CONST_ERR, | |||
expr.id, | |||
expr.span, | |||
&format!("constant evaluation error: {}. This will \ | |||
become a HARD ERROR in the future", | |||
&format!("constant evaluation error: {}", |
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.
@oli-obk
I initially wanted to move const_err
into the future_incompatible
group based on this comment, but it looks like this comment was actually outdated and this lint is not going to be an error?
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.
Yea. These are essentially bugs
I've also audited the remaining ungrouped lints. Unused++.
Bad style++.
Future compatibility++.
Restrictions.
Pedantic.
Obvious mistakes.
General purpose lints.
|
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.
The lint store has a function register_removed
@@ -621,12 +621,6 @@ impl EarlyLintPass for AnonymousParameters { | |||
} | |||
} | |||
|
|||
declare_lint! { | |||
DEPRECATED_ATTR, |
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.
Just removing these lints will cause users who mention them in allow/warn/deny statements to produce warnings about unknown lints. Does rustc have a removed lint list like clippy does?
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.
Yes, there's a list of removed lints, I'll add these lints into it.
I would like fine grained grouping. I think we have an open issue in clippy. People often complain that they are overwhelmed by the style lints, when they want to get to the bug lints first |
☔ The latest upstream changes (presumably #45489) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased and updated with a fix for #45424 (comment) |
Lgtm now. Do we have an issue to discuss the fine grained lint groups and not clear cut "unused"-lints? #45424 (comment) as an issue would be good I think @bors r+ |
@oli-obk: 🔑 Insufficient privileges: Not in reviewers |
@bors r=oli-obk |
📌 Commit 0b7a8b5 has been approved by |
⌛ Testing commit 0b7a8b5b146c002177ade20be0a29a2d34cafed3 with merge 518ec2985dd8476aabaa3966564073bc7a393464... |
💔 Test failed - status-travis |
@bors retry #43283 (
|
⌛ Testing commit 0b7a8b5b146c002177ade20be0a29a2d34cafed3 with merge 5b370c494c9f0039676c7b72c21206d960155e95... |
💔 Test failed - status-travis |
Remove a couple of obsolete lints
The use of
|
@bors r=oli-obk |
📌 Commit bf0cdb5 has been approved by |
Hmm. Ideally the writer of the macro should need the feature gate, not the user. But AFAIK pretty much all checking of macros is left until the last possible second. For example the current version of |
Let's just stabilize |
Add several lints into `unused` lint group Also a couple of obsolete (not reported) lints are removed. r? @oli-obk
☀️ Test successful - status-appveyor, status-travis |
Uh, please at least try to fix tools that break (even if you mark it as broken in the interim). In this case for some reason |
Oh, nvm, I made a mistake. Sorry. |
Also a couple of obsolete (not reported) lints are removed.
r? @oli-obk