Skip to content

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

Closed
@scottmcm

Description

@scottmcm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-unstableBlocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-TrackedLibs issues that are tracked on the team's project board.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions