Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

array docs should mention slice patterns #61650

Closed
scottmcm opened this issue Jun 8, 2019 · 0 comments · Fixed by #61652
Closed

array docs should mention slice patterns #61650

scottmcm opened this issue Jun 8, 2019 · 0 comments · Fixed by #61652
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@scottmcm
Copy link
Member

scottmcm commented Jun 8, 2019

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.)

@scottmcm 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
Centril added a commit to Centril/rust that referenced this issue Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant