-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Extend implicit_clone
to handle to_string
calls
#14177
base: master
Are you sure you want to change the base?
Conversation
72eccf1
to
a1615be
Compare
@y21 Sorry for the force pushes. I think it should be good now. |
a1615be
to
cb609f7
Compare
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.
Makes sense to me. I opened a thread on Zulip to give people a chance and some time to comment on this since this involves a deprecation
nit: |
656f7a5
to
daa7c5f
Compare
Hmm. Lines 48 to 52 in f83c94c
|
From what I can tell, driver.sh requires a stderr file with a certain structure. I picked the first one I could find that worked. That happened to be |
Yeah, I think that should be fine. Looking at git blame for that line, looks like the lint name on that line has changed a couple of times before. |
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.
Looks good, and the thread on Zulip got a bunch of positive reactions so we should be fine here with deprecating/merging the lint.
However, going to tag @flip1995 here for the change in .github/driver.sh
. It looks correct to me, but just making sure because he's said he wants to be notified of any changes that affect CI.
Yeah, detecting However, I don't think special-casing |
f8ad6f6
to
0b85f4d
Compare
Scratch that. I am undoing the following commits. I explain why below.
#14396 matches on both method calls and calls to type-relative paths. But the code that calls I think it would be desirable to have So I find the present situation unfortunate, but I guess it's what we've got. |
@y21 Could I impose on you to please try to merge this? |
One issue with this split as it is now is that we get two warnings with different suggestions on the same code, I still don't think that we really need the |
b3e48ef
to
46f720c
Compare
Sorry, you mentioned So this PR is back to deprecating A quick note: to avoid overlapping warnings between
Sorry to give you more code to review. |
46f720c
to
12dff35
Compare
The force push was to make one comment slightly less verbose. |
Put another way, merge
string_to_string
intoimplicit_clone
, as suggested here: #14173 (comment)Note: I wrote this comment:
rust-clippy/clippy_lints/src/methods/implicit_clone.rs
Lines 43 to 45 in 6cdb7f6
Here is the context for why I wrote it: #7978 (comment)
Regardless, it's probably time for the comment to go away. Extending
implicit_clone
to handleto_string
calls yields many hits within Clippy's codebase.changelog: extend
implicit_clone
to handleto_string
calls