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

Tracking issue for ToOwned::clone_into (toowned_clone_into) #41263

Closed
2 tasks
scottmcm opened this issue Apr 13, 2017 · 16 comments · Fixed by #97455
Closed
2 tasks

Tracking issue for ToOwned::clone_into (toowned_clone_into) #41263

scottmcm opened this issue Apr 13, 2017 · 16 comments · Fixed by #97455
Labels
B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. Libs-Tracked Libs issues that are tracked on the team's project board. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@scottmcm
Copy link
Member

scottmcm commented Apr 13, 2017

Feature added in PR #41009

Questions raised in the PR:

  • The directionality is weird. In clone_from and assignment, the data moves right-to-left, but this moves it left-to-right. And that means that autoref doesn't work well, usually forcing you to write &mut.

  • But fixing that would mean putting it somewhere else, since the Self in ToOwned is the wrong type for what this needs to be. And moving it while still being overridable and providing a default is hard.

@alexcrichton alexcrichton added B-unstable Blocker: Implemented in the nightly compiler and unstable. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Apr 13, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. label Jul 22, 2017
@SimonSapin
Copy link
Contributor

In nightly for 11 months with no reported issues since. Let’s stabilize.

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Mar 17, 2018

Team member @SimonSapin has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Mar 17, 2018
@rfcbot
Copy link

rfcbot commented Mar 19, 2018

🔔 This is now entering its final comment period, as per the review above. 🔔

@scottmcm
Copy link
Member Author

scottmcm commented Mar 20, 2018

Hmm, I was bad at creating tracking issues a year ago 😅 (fixed)

This is sufficient, but still feels suboptimal for the reasons from #41009 (comment):

  • The directionality is weird. In clone_from and assignment, the data moves right-to-left, but this moves it left-to-right. And that means that autoref doesn't work well, usually forcing you to write &mut.

  • But fixing that would mean putting it somewhere else, since the Self in ToOwned is the wrong type for what this needs to be. And moving it while still being overridable and providing a default is hard.

Any good ideas?

Edit: Hmm, maybe once we flatten the facade (since Borrow is in core but ToOwned is in alloc) then Borrow could have fn owned_from(&mut self, other: &Borrowed) where Borrowed: ToOwned<Owned=Self> { *self = other.to_owned(); }?

@alexcrichton
Copy link
Member

@rfcbot concern direction

formally registering @scottmcm's concern

@rfcbot
Copy link

rfcbot commented Mar 29, 2018

The final comment period is now complete.

@Centril
Copy link
Contributor

Centril commented May 24, 2018

@alexcrichton rfcbot did not register the concern :) (the syntax you used is accepted nowadays however..)

@scottmcm
Copy link
Member Author

I feel bad seeing this in TWiR every week now. Anything I can do to help it get somewhere productive?

@kennytm
Copy link
Member

kennytm commented Jul 18, 2018

Nominating for discussion (how to address the concern raised in #41263 (comment)). ↑.

@SimonSapin
Copy link
Contributor

It looks like this still needs some API some design work, so we’re not actually ready to stabilize.

@rfcbot fcp cancel

This probably needs someone to champion a new API proposal.

@rfcbot
Copy link

rfcbot commented Aug 1, 2018

@SimonSapin proposal cancelled.

@rfcbot rfcbot removed the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Aug 1, 2018
@KodrAus KodrAus added the Libs-Tracked Libs issues that are tracked on the team's project board. label Jul 31, 2020
@m-ou-se
Copy link
Member

m-ou-se commented Mar 2, 2022

This was discussed in the libs-api meeting just now. We discussed how this method is used in Cow's clone_from implementation, and how that seems to be a good reason to stabilize this function and allow others to imlement it.

@rfcbot merge

@rfcbot
Copy link

rfcbot commented Mar 2, 2022

Team member @m-ou-se has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Mar 2, 2022
@scottmcm
Copy link
Member Author

scottmcm commented Apr 6, 2022

Friendly one-month pFCP ping, @Amanieu @BurntSushi @joshtriplett

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Apr 6, 2022
@rfcbot
Copy link

rfcbot commented Apr 6, 2022

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Apr 16, 2022
@rfcbot
Copy link

rfcbot commented Apr 16, 2022

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Apr 21, 2022
@bors bors closed this as completed in bf248c8 May 31, 2022
workingjubilee pushed a commit to tcdi/postgrestd that referenced this issue Sep 15, 2022
…olnay

Stabilize `toowned_clone_into`

Closes #41263
FCP has been done: rust-lang/rust#41263 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. Libs-Tracked Libs issues that are tracked on the team's project board. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

11 participants