]> git.lizzy.rs Git - rust.git/commitdiff
Mention slice patterns
authorYuki Okushi <huyuumi.dev@gmail.com>
Sat, 8 Jun 2019 07:13:15 +0000 (16:13 +0900)
committerYuki Okushi <huyuumi.dev@gmail.com>
Sat, 8 Jun 2019 07:13:15 +0000 (16:13 +0900)
src/libstd/primitive_docs.rs

index 24f728158c47260e85cdbaa3ef80094ac328c86b..0ba6e99e61342c6bee2068ab0ac5c17f0d5a0ad8 100644 (file)
@@ -482,8 +482,8 @@ mod prim_pointer { }
 /// an array. Indeed, this provides most of the API for working with arrays.
 /// Slices have a dynamic size and do not coerce to arrays.
 ///
-/// There is no way to move elements out of an array. See [`mem::replace`][replace]
-/// for an alternative.
+/// You can move elements out of an array with a slice pattern. If you want
+/// one element, see [`mem::replace`][replace].
 ///
 /// # Examples
 ///