-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
array docs should mention slice patterns #61650
Copy link
Copy link
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.
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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
The array docs currently say
rust/src/libstd/primitive_docs.rs
Lines 485 to 486 in 6312b89
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
replaceas an option for people who only want one item.)