You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scottmcm opened this issue
Jun 8, 2019
· 0 comments
· Fixed by #61652
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.
/// 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.)
The text was updated successfully, but these errors were encountered:
scottmcm
added
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
labels
Jun 8, 2019
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.
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
replace
as an option for people who only want one item.)The text was updated successfully, but these errors were encountered: