about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2019-06-08 16:13:15 +0900
committerYuki Okushi <huyuumi.dev@gmail.com>2019-06-08 16:13:15 +0900
commit1a32a68f38a9d74209fb710187a1909af8b1979d (patch)
treef5ae7727fcabd86f8b25aefd4cea01ab70318b5e
parentc5295ac64a8f2c7aee9cdd13b8fe00b82aff8435 (diff)
downloadrust-1a32a68f38a9d74209fb710187a1909af8b1979d.tar.gz
rust-1a32a68f38a9d74209fb710187a1909af8b1979d.zip
Mention slice patterns
-rw-r--r--src/libstd/primitive_docs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs
index 24f728158c4..0ba6e99e613 100644
--- a/src/libstd/primitive_docs.rs
+++ b/src/libstd/primitive_docs.rs
@@ -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
 ///