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

useless_asref: add a check for Clone before suggesting the use of .clone() #14174

Merged
merged 1 commit into from
Feb 22, 2025

Conversation

lapla-cogito
Copy link
Contributor

fixes #12357

changelog: [useless_asref]: don't suggest to use .clone() if the target type doesn't implement the Clone trait

@rustbot
Copy link
Collaborator

rustbot commented Feb 8, 2025

r? @y21

rustbot has assigned @y21.
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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 8, 2025
@lapla-cogito lapla-cogito changed the title make useless_asref check for the presence of the Clone trait useless_asref: add a check for Clone before suggesting the use of .clone() Feb 8, 2025
@lapla-cogito
Copy link
Contributor Author

Rebased.

Copy link
Member

@y21 y21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@y21 y21 added this pull request to the merge queue Feb 22, 2025
Merged via the queue into rust-lang:master with commit d5488b3 Feb 22, 2025
11 checks passed
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.

clippy::useless_asref suggestion doesn't compile in 1.77.0
3 participants