Skip to content

Cloning a fixed-size array loses size info. #18225

Description

@canndrew

The following code doesn't compile. It would be nice if it did.

fn main() {
  let x: [u8, ..1] = [0];
  let y: [u8, ..1] = x.clone();
}

This is because x.clone() returns a &[u8] instead of a [u8, ..1].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions