new lint `legacy_numeric_constants`
Rework of #10997
Currently this uses path matching instead of diagnostic items. I plan on adding the diagnostic items to rustc soon but figured I would open this in the meantime. I'll leave it up to the clippy team on whether they'd rather wait or not.
Closes #10995
changelog: New lint [legacy_numeric_constants]
r? @dswij
rustbot has assigned @dswij. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
r? xFrednet since they reviewed the last one. Also, CC @Centri3
:umbrella: The latest upstream changes (presumably #12306) made this pull request unmergeable. Please resolve the merge conflicts.
Hey, thank you for picking this up. This is on my todo list for next week, you should have a review by Friday, the latest. :)
Thanks for taking a look. It seems like the next toolchain update should be on the 7th, which should include all the necessary diagnostic items.
I've made the changes you suggested, but wait to merge until I modify this to use the diag items.
Welp, in working on the implementation I discovered that the diag items were still incomplete. So I guess we'll wait another two weeks 🙃
Okay, good to know :D I'll mark this as waiting for you. Once the next update is ready, you can push the update, and it should show up in my inbox again. Otherwise, you can also always ping me :D
@rustbot author
:umbrella: The latest upstream changes (presumably #12511) made this pull request unmergeable. Please resolve the merge conflicts.
@rustbot ready
Looks like bors commands still don't work in reviews... Let's try this again:
@bors delegate+
:v: @pitaj, you can now approve this pull request!
If @xFrednet told you to "r=me" after making some further change, please make that change, then do @bors r=xFrednet
Actually, let's not r+ it yet. I just remembered that @Manishearth suggested in the last meeting, that we discuss/notify others about new lints first to see if someone has comments on it. So let's keep this open for a week, to see if others have any thoughts on it. I'll write something for Zulip :)
Zulip: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/New.20.60legacy_numeric_constants.60.20lint.20rust-clippy.2312312/near/429186612
It has been a week and all comments have been positive, so I'm merging this now. Thank you for the new lint :D
@bors r+
@rustbot label -S-final-comment-period
:pushpin: Commit f2e91ab1b9aaab23b81fc5ea5de43367cb9b9e6d has been approved by xFrednet
It is now in the queue for this repository.
:hourglass: Testing commit f2e91ab1b9aaab23b81fc5ea5de43367cb9b9e6d with merge cebf879de895deae27be8593692ce54023d7f48e...
:sunny: Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test Approved by: xFrednet Pushing cebf879de895deae27be8593692ce54023d7f48e to master...