-
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
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) |
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.
+1 for squatting that crate name, but that isn't a blocker for this PR. And we should only publish a dummy like clippy_dummy
to avoid confusion.
I also think there are some references to utils
in the doc
dir.
@@ -0,0 +1,574 @@ | |||
#![allow(clippy::float_cmp)] |
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.
Weird that git doesn't recognize that this file was just moved 🤔
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.
There's a small difference:
3c3
< use crate::utils::{clip, sext, unsext};
---
> use crate::{clip, sext, unsext};
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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.
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::utils
as its own crate,clippy_utils
.This change will allow
clippy_utils
to 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_utils
so it can be used by external tools (not published)