-
Notifications
You must be signed in to change notification settings - Fork 218
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
Support both old and new rust toolchains simultaneously (clippy conversion related) #1106
Conversation
These appeared with Rust 1.45.
This ensures no surprises where new Rust release introduces some new Clippy lints and breaks our build. We"re now in full control of what versions we run in CI, and can update on our own schedule.
@Minoru: I think my latest commit makes it possible to drop a1cee13. Also, feel free to make any changes yourself to this branch or just cherry-pick my commit onto your existing PR. |
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.
That"s neat! I couldn"t imagine that there"s a lint to disable warnings about unknown lints :)
I"m in two minds about this. On one hand, this lets people with older toolchains run Clippy locally and see just the warnings that they introduced. On the other hand, we have no way of knowing when to drop the old lint for good, so they"ll just keep piling up. Also, anyone who suppresses a Clippy warning might need to implement this trick too, which implies they need to know about it.
I have no way of knowing which side is objectively better, so let"s err on the side of compatibility for now: please drop a1cee13, see CI pass here, and merge this. After all, I can always re-visit this decision if it ends up causing trouble.
Thanks for working on this!
old: clippy::identity_conversion (needed before 1.45.0) new: clippy::useless_conversion options (needed since 1.45.0) clippy::unknown_clippy_lints is needed for old toolchains to ignore clippy::useless_conversion. renamed_and_removed_lints is needed for new toolchains to ignore renamed clippy::identity_conversion.
c631974
to
02c1c2a
Compare
Somewhere in the future we might be able to use something like the following instead of those 4 lines:
but it depends on rust-lang/rfcs#2523 which is not yet implemented (rust-lang/rust#64796). It might also be possible to use |
No description provided.