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(suspicious_to_owned): use span_suggestions to suggest both intents #10295

Merged
merged 5 commits into from
Feb 8, 2023

Conversation

kartva
Copy link
Contributor

@kartva kartva commented Feb 4, 2023

fixes #10294

changelog: [suspicious_to_owned]: suggestions now produce valid Rust code

@rustbot
Copy link
Collaborator

rustbot commented Feb 4, 2023

r? @dswij

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 4, 2023
@Jarcho
Copy link
Contributor

Jarcho commented Feb 5, 2023

Since you're already changing things, it might look better when given two suggestions with different help messages.

e.g.

span_suggestion(..., "either convert it to it's owned type", ...)
span_suggestion(..., "or clone it", ...)

@kartva
Copy link
Contributor Author

kartva commented Feb 6, 2023

Thanks for the suggestion! I initially wasn't sure about using the method, but this looks much better.

@Jarcho
Copy link
Contributor

Jarcho commented Feb 8, 2023

That is nicer to read.

Thank you for the fix. @bors r+

@bors
Copy link
Collaborator

bors commented Feb 8, 2023

📌 Commit b7c3898 has been approved by Jarcho

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Feb 8, 2023

⌛ Testing commit b7c3898 with merge 3bb6ee5...

@bors
Copy link
Collaborator

bors commented Feb 8, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Jarcho
Pushing 3bb6ee5 to master...

@bors bors merged commit 3bb6ee5 into rust-lang:master Feb 8, 2023
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.

suspicious_to_owned lint for Cow has invalid MaybeIncorrect fix
5 participants