-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: 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.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
The array docs currently say
rust/src/libstd/primitive_docs.rs
Lines 485 to 486 in 6312b89
/// 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
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: 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.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.