-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Update lint deprecation for tool lints #4363
Conversation
Note that the current change means, that this will stop deprecation warnings when using non-tool lints, like cc @flip1995 |
When I implemented the tool lints, I was aware of this problem, but decided to leave it untouched until we heave to deprecate another lint. The reasoning behind that was, that people who still use the deprecated lints, probably won't use tool lints. That reasoning still applies, so the best case would be to allow deprecating both tool lints and non-tool lints. But IIRC that wasn't that easy to implement (otherwise I would have done it (probably 😄)). I think every maintained crate swapped to tool lints by now and we're on the safe side to make this change? |
I haven't tried it, but wouldn't it be enough to register both the tool version and the non-tool version as removed (on the Clippy side)? |
This warning is not optimal, but I think as long as there is some warning about deprecated lints, this should be fine. |
"`Vec::as_mut_slice` has been stabilized in 1.7", | ||
); | ||
store.register_removed( | ||
"str_to_string", | ||
"clippy::str_to_string", | ||
"using `str::to_string` is common even today and specialization will likely happen soon", |
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.
"specialization will likely happen soon" 15e55f5 lol 😄
We can try it. But that should only be required for lints that were deprecated before tool lints existed. So I would place them in a separate function or write a |
5aee384
to
9378def
Compare
@flip1995 should be good to go now |
Our lint deprecation previously didn't work for tool lints, because `register_removed` was registering lints to be removed _without_ the `clippy` prefix.
9378def
to
e406ab5
Compare
Thanks! @bors r+ |
📌 Commit e406ab5 has been approved by |
Update lint deprecation for tool lints changelog: Allow tool lints (`clippy::*`) to be deprecated Our lint deprecation previously didn't work for tool lints, because `register_removed` was registering lints to be removed _without_ the `clippy` prefix. Fixes #4349
💔 Test failed - checks-travis |
Looks spurious?
@bors retry |
@bors retry yup! |
Update lint deprecation for tool lints changelog: Allow tool lints (`clippy::*`) to be deprecated Our lint deprecation previously didn't work for tool lints, because `register_removed` was registering lints to be removed _without_ the `clippy` prefix. Fixes #4349
☀️ Test successful - checks-travis, status-appveyor |
changelog: Allow tool lints (
clippy::*
) to be deprecatedOur lint deprecation previously didn't work for tool lints, because
register_removed
was registering lints to be removed without theclippy
prefix.Fixes #4349