Skip to content

Conversation

xonx4l
Copy link
Contributor

@xonx4l xonx4l commented Aug 31, 2025

Fixes #144792

Guide users from Cow::to_owned() to Cow::into_owned() on lifetime error.
Improve diagnostic help for Cow to owned conversions.

@rustbot
Copy link
Collaborator

rustbot commented Aug 31, 2025

r? @jackh726

rustbot has assigned @jackh726.
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 S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 31, 2025
@rust-log-analyzer
Copy link
Collaborator

The job tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@Noratrieb
Copy link
Member

This has the same code as #144925 except with a few changes that break the build, and it has no attribute to that whatsoever. What was the idea behind this PR?

@Noratrieb Noratrieb closed this Sep 1, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 1, 2025
@xonx4l
Copy link
Contributor Author

xonx4l commented Sep 3, 2025

I wanted to introduce nothing new. It's just a pr with the suggested changes on #144925.

@Noratrieb
Copy link
Member

When you take code from somewhere else, you always need to indicate where you got it from and credit it appropriately, you can't just make it look like its your own. You didn't even include a note to the previous PR in the PR description, but ideally you would preserve the authorship of the commit itself so the original author shows up as the author of the commit.

@xonx4l
Copy link
Contributor Author

xonx4l commented Sep 4, 2025

I really didn't know about the credit part . In future I will make sure to give full credit. Thanks for educating about this part of open source .

@Noratrieb
Copy link
Member

👍 thanks. While it's of course important in open source, it really applies to anything, not just open source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad diagnostic with Cow and to_owned where into_owned was meant
5 participants