Skip to content

impl Clone for Box<[T]> #25097

Closed
Closed
@bluss

Description

@bluss

We need to find a way to implement Clone for Box<[T]> where T: Clone.

In user code, "cloning" such a box manually is simple: .to_vec().into_boxed_slice() will do it with a short roundtrip through Vec<T> which should be unproblematic.

In the rust distribution, we can't impl Clone easily since the tools to do so are in libcollections but the Box type lives in liballoc.

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