-
Notifications
You must be signed in to change notification settings - Fork 13k
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
check constants even if they are not used in the current crate #32644
Conversation
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -17,7 +17,8 @@ impl std::ops::Neg for S { | |||
} | |||
|
|||
const _MAX: usize = -1; | |||
//~^ ERROR unary negation of unsigned integer | |||
//~^ WARN unary negation of unsigned integer | |||
//~| ERROR unary negation of unsigned integer |
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.
This is odd - we shouldn't get a warning and 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.
Well... we can turn the lint into a deny
-by-default lint and then we'd never reach the error
r+ with the make tidy issues fixed. |
d22bf20
to
aa573a8
Compare
fixed |
@bors: r+ |
📌 Commit aa573a8 has been approved by |
☔ The latest upstream changes (presumably #32562) made this pull request unmergeable. Please resolve the merge conflicts. |
aa573a8
to
913a2b4
Compare
rebased |
@bors: r+ |
📌 Commit 913a2b4 has been approved by |
⌛ Testing commit 913a2b4 with merge 6a3b558... |
For now this is just a
warn
-by-default lint. I suggest to make it adeny
-by-default lint in the next release cycle (so no dependencies break), and then in another release cycle move to an error.cc #19265
cc #3170