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

Fix implicit_clone for &&T #8231

Merged
merged 1 commit into from
Jan 14, 2022
Merged

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Jan 5, 2022

fixes #8227

changelog: Fix suggestion for implicit_clone on &&T

@rust-highfive
Copy link

r? @camsteffen

(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 Jan 5, 2022
@camsteffen
Copy link
Contributor

Hmm I feel like treating this as a false positive goes against the intention of the lint. I also get that suggesting (*x).clone() is not great, but I think that is the best we can do. In reality my suggestion would be to avoid &&T variables, but suggesting a fix for that is not really feasible.

@Jarcho
Copy link
Contributor Author

Jarcho commented Jan 6, 2022

It's at least a pedantic lint so a less-than-great suggestion is fine. I'm sure we'll also get a bug report saying the suggestion sucks though.

@camsteffen camsteffen added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jan 7, 2022
@camsteffen
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 14, 2022

📌 Commit ad95279 has been approved by camsteffen

@bors
Copy link
Collaborator

bors commented Jan 14, 2022

⌛ Testing commit ad95279 with merge 7a4acf9...

@bors
Copy link
Collaborator

bors commented Jan 14, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: camsteffen
Pushing 7a4acf9 to master...

@bors bors merged commit 7a4acf9 into rust-lang:master Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FP implicit-clone: &&Path.to_path_buf()
4 participants