Factor out clippy_utils crate#6756
Conversation
|
r? @phansch (rust-highfive has picked a reviewer for you, use r? to override) |
|
(we should still squat the crate on crates.io, though) |
| @@ -0,0 +1,574 @@ | |||
| #![allow(clippy::float_cmp)] | |||
There was a problem hiding this comment.
Weird that git doesn't recognize that this file was just moved 🤔
There was a problem hiding this comment.
There's a small difference:
3c3
< use crate::utils::{clip, sext, unsext};
---
> use crate::{clip, sext, unsext};
There was a problem hiding this comment.
Yeah, that's fine, but git manged to figure this out for other files. That's what confuses me.
There was a problem hiding this comment.
You can tweak the git rename sensitivity (docs)
Thanks. I think I got them all: smoelius@3341e3d |
|
r? @flip1995 (I'm short on time this week) |
|
☔ The latest upstream changes (presumably #6754) made this pull request unmergeable. Please resolve the merge conflicts. |
|
This needs a rebase. |
e895636 to
a457ad3
Compare
|
☔ The latest upstream changes (presumably #6573) made this pull request unmergeable. Please resolve the merge conflicts. |
Co-authored-by: Philipp Krones <hello@philkrones.com>
a457ad3 to
ab7381f
Compare
|
I rebased this again, following #6573. Please let me know if there is anything I can do to make the review go more smoothly. |
flip1995
left a comment
There was a problem hiding this comment.
LGTM. But I want a second approval on this, since it is a bigger change @rust-lang/clippy
|
@bors r=flip1995,oli-obk EDIT: Accidentally shipped oli-obk with obi-wan kenobi. |
|
📌 Commit ab7381f has been approved by |
|
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
|
Mmh, looks like this broke some part of CI ..? |
|
Fix attempt at #6785 |
|
Thank you @matthiaskrgr. An alternative solution (I think) is #6786. @flip1995 argued that |
|
I prefer the solution by @smoelius. I don't think publishing |
|
Thank you, very sincerely, @oli-obk, @Manishearth, @matthiaskrgr, and especially @flip1995. |
As discussed in #6746, this PR factors out
clippy_lints::utilsas its own crate,clippy_utils.This change will allow
clippy_utilsto be used in lints outside of Clippy.There is no plan to publish this crate on
crates.io(see #6746 (comment)). Dependent crates should obtain it from GitHub.changelog: Factor out
clippy_utilsso it can be used by external tools (not published)