Skip to content

ImplicitClone for Copy typesΒ #32

Open
@kirillsemyonkin

Description

@kirillsemyonkin

Issue for implementing ImplicitClone for all Copy types.

As noted in yewstack/yew#3464 (comment), the entirety of all Copy types may receive an ImplicitClone implementation via specializations (currently nightly):

#![feature(specialization)]

default impl<T: Copy> ImplicitClone for T {
}

However, the RFC for specializations is nowhere near being done, so for this point in time ImplicitClone will still stay limited in the amount of types that will be implemented (and this issue will stay open).

Alternatively, a Rust RFC should be made that would allow ImplicitClone for Copy types: the only blocking suggestion from the Rust compiler is that the trait may have colliding implementations in future, which is not correct since the marker trait is empty, and there is nothing to collide with. The RFC would allow repeating marker trait implementations. Comment if someone makes such an RFC and I will update this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions