Skip to content
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

Improve clone_on_copy #7000

Merged
merged 1 commit into from
Mar 30, 2021
Merged

Improve clone_on_copy #7000

merged 1 commit into from
Mar 30, 2021

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Mar 29, 2021

This also removes the clone_on_copy_mut test as the same thing is covered in the clone_on_copy test.

changelog: copy_on_clone lint on chained method calls taking self by value
changelog: copy_on_clone only lint when using the Clone trait
changelog: copy_on_clone correct suggestion when the cloned value is a macro call.

@rust-highfive
Copy link

r? @llogiq

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 29, 2021
@llogiq
Copy link
Contributor

llogiq commented Mar 29, 2021

Thank you! @bors r+

@bors
Copy link
Collaborator

bors commented Mar 29, 2021

📌 Commit db5bd9f has been approved by llogiq

@bors
Copy link
Collaborator

bors commented Mar 29, 2021

⌛ Testing commit db5bd9f with merge 227cbfc...

bors added a commit that referenced this pull request Mar 29, 2021
Improve `clone_on_copy`

This also removes the `clone_on_copy_mut` test as the same thing is covered in the `clone_on_copy` test.

changelog: `copy_on_clone` lint on chained method calls taking self by value
changelog: `copy_on_clone` only lint when using the `Clone` trait
changelog: `copy_on_clone` correct suggestion when the cloned value is a macro call.
@bors
Copy link
Collaborator

bors commented Mar 29, 2021

💔 Test failed - checks-action_test

Lint on `_.clone().method()` when method takes self by value
Set applicability correctly
Correct suggestion when the cloned value is a macro call. e.g. `m!(x).clone()`
Don't lint when not using the `Clone` trait
@llogiq
Copy link
Contributor

llogiq commented Mar 30, 2021

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 30, 2021

📌 Commit d265776 has been approved by llogiq

@bors
Copy link
Collaborator

bors commented Mar 30, 2021

⌛ Testing commit d265776 with merge 0552852...

@bors
Copy link
Collaborator

bors commented Mar 30, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 0552852 to master...

@bors bors merged commit 0552852 into rust-lang:master Mar 30, 2021
@Jarcho Jarcho deleted the clone_on_copy_fp branch April 6, 2021 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants