Skip to content

array docs should mention slice patterns #61650

Closed
@scottmcm

Description

@scottmcm

The array docs currently say

/// There is no way to move elements out of an array. See [`mem::replace`][replace]
/// for an alternative.

But now that slice patterns are stable, that's not quite true. It would be good for the docs to mention that you can move all items out of an array using a slice pattern. (And continue to mention replace as an option for people who only want one item.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions