Skip to content

Blanket impl of AsRef for Deref #45742

Open
@cramertj

Description

@cramertj

There are currently FIXMEs here and here in the core AsRef and AsMut impls to change the implementations for & and &mut to a blanket impl over Deref and DerefMut. However, this blanket impl results in a number of conflicts (even with deref). Because of this, I opened #45378 to remove the FIXMEs, but @withoutboats pointed out that we could potentially use intersection specialization to resolve the issue.

I'm not sure exactly what this impl (or set of impls) would look like, so I've closed the PR and opened this issue to track the resolution of the FIXMEs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-specializationArea: Trait impl specializationC-cleanupCategory: PRs that clean code up or issues documenting cleanup.S-blockedStatus: Blocked on something else such as an RFC or other implementation work.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions