about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-09-03 02:22:04 +0200
committerGitHub <noreply@github.com>2020-09-03 02:22:04 +0200
commit3e156cfe90ae883a82e4fc3e62945542ae2033b0 (patch)
tree72c3720211b968be5d2da1a3848f47a840d0973e
parent9605f94f6989fd547f5e61506b18963d24b450ea (diff)
parenta74d4e4889c02dd49fe69e533e92104920832d09 (diff)
downloadrust-3e156cfe90ae883a82e4fc3e62945542ae2033b0.tar.gz
rust-3e156cfe90ae883a82e4fc3e62945542ae2033b0.zip
Rollup merge of #76164 - lzutao:slice-array, r=ehuss
Link to slice pattern in array docs

Fix a todo in https://github.com/rust-lang/reference/issues/739#issuecomment-578408449
-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 d00824cfb3e..2a4cb22cc52 100644
--- a/library/std/src/primitive_docs.rs
+++ b/library/std/src/primitive_docs.rs
@@ -510,7 +510,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
@@ -552,7 +552,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. */ }
@@ -567,7 +567,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 {}