about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2020-08-31 14:53:02 +0000
committerLzu Tao <taolzu@gmail.com>2020-08-31 14:53:02 +0000
commita74d4e4889c02dd49fe69e533e92104920832d09 (patch)
tree08913e36e3051d16b8f8dab2e471f5efbd7633c6
parent3b4797cb598260b96dd8d6e47cd429210e14c1f6 (diff)
downloadrust-a74d4e4889c02dd49fe69e533e92104920832d09.tar.gz
rust-a74d4e4889c02dd49fe69e533e92104920832d09.zip
Link to slice pattern in array docs
-rw-r--r--library/std/src/primitive_docs.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/primitive_docs.rs b/library/std/src/primitive_docs.rs
index 2339ca527bd..02063c2b131 100644
--- a/library/std/src/primitive_docs.rs
+++ b/library/std/src/primitive_docs.rs
@@ -477,7 +477,7 @@ 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.
 ///
-/// You can move elements out of an array with a slice pattern. If you want
+/// You can move elements out of an array with a [slice pattern]. If you want
 /// one element, see [`mem::replace`].
 ///
 /// # Examples
@@ -519,7 +519,7 @@ mod prim_pointer {}
 /// for x in &array { }
 /// ```
 ///
-/// You can use a slice pattern to move elements out of an array:
+/// You can use a [slice pattern] to move elements out of an array:
 ///
 /// ```
 /// fn move_away(_: String) { /* Do interesting things. */ }
@@ -534,7 +534,7 @@ mod prim_pointer {}
 /// [`Hash`]: hash::Hash
 /// [`Borrow`]: borrow::Borrow
 /// [`BorrowMut`]: borrow::BorrowMut
-///
+/// [slice pattern]: ../reference/patterns.html#slice-patterns
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_array {}