Skip to content

Commit 3e156cf

Browse files
authored
Rollup merge of #76164 - lzutao:slice-array, r=ehuss
Link to slice pattern in array docs Fix a todo in rust-lang/reference#739 (comment)
2 parents 9605f94 + a74d4e4 commit 3e156cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/std/src/primitive_docs.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ mod prim_pointer {}
510510
/// an array. Indeed, this provides most of the API for working with arrays.
511511
/// Slices have a dynamic size and do not coerce to arrays.
512512
///
513-
/// You can move elements out of an array with a slice pattern. If you want
513+
/// You can move elements out of an array with a [slice pattern]. If you want
514514
/// one element, see [`mem::replace`].
515515
///
516516
/// # Examples
@@ -552,7 +552,7 @@ mod prim_pointer {}
552552
/// for x in &array { }
553553
/// ```
554554
///
555-
/// You can use a slice pattern to move elements out of an array:
555+
/// You can use a [slice pattern] to move elements out of an array:
556556
///
557557
/// ```
558558
/// fn move_away(_: String) { /* Do interesting things. */ }
@@ -567,7 +567,7 @@ mod prim_pointer {}
567567
/// [`Hash`]: hash::Hash
568568
/// [`Borrow`]: borrow::Borrow
569569
/// [`BorrowMut`]: borrow::BorrowMut
570-
///
570+
/// [slice pattern]: ../reference/patterns.html#slice-patterns
571571
#[stable(feature = "rust1", since = "1.0.0")]
572572
mod prim_array {}
573573

0 commit comments

Comments
 (0)