-
Notifications
You must be signed in to change notification settings - Fork 867
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
Fix clippy::legacy_numeric_consts lints. #3651
Fix clippy::legacy_numeric_consts lints. #3651
Conversation
d7f9c34
to
1ec3744
Compare
I think this lint is not enabled by clippy by default or yet? We'd need it breaking on CI to catch stuff like that in the future and it should be on stable clippy as well. |
Prefer to use the associated constants on the types rather than the legacy items like `std::<type>::MAX` or functions like `max_value`. These legacy items are marked to indicate that they will be deprecated in a future version of Rust.
1ec3744
to
b0d6550
Compare
It is coming. It is present in clippy but not enabled by default in I've rebased the changes to fix the merge conflict and force pushed it. |
I'm just saying that without automatic way to check for that there's no way we ensure that it'll stay the same. In general, if it'll come to stable, we'll fix our CI once it happens. |
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.
See above, I generally don't mind, but it's a style change which one can easily reentroduce without a lint in place, so should be done when lint is ready.
So I should close this and not waste any more time? |
Yes, because the lint is not stable yet and once it's stable we'll fix it along other new lints, because CI will fail. |
Prefer to use the associated constants on the types rather than the legacy items like
std::<type>::MAX
or functions likemax_value
. These legacy items are marked to indicate that they will be deprecated in a future version of Rust.changelog
module if knowledge of this change could be valuable to users