Skip to content

Commit a74d4e4

Browse files
committed
Link to slice pattern in array docs
1 parent 3b4797c commit a74d4e4

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
@@ -477,7 +477,7 @@ mod prim_pointer {}
477477
/// an array. Indeed, this provides most of the API for working with arrays.
478478
/// Slices have a dynamic size and do not coerce to arrays.
479479
///
480-
/// You can move elements out of an array with a slice pattern. If you want
480+
/// You can move elements out of an array with a [slice pattern]. If you want
481481
/// one element, see [`mem::replace`].
482482
///
483483
/// # Examples
@@ -519,7 +519,7 @@ mod prim_pointer {}
519519
/// for x in &array { }
520520
/// ```
521521
///
522-
/// You can use a slice pattern to move elements out of an array:
522+
/// You can use a [slice pattern] to move elements out of an array:
523523
///
524524
/// ```
525525
/// fn move_away(_: String) { /* Do interesting things. */ }
@@ -534,7 +534,7 @@ mod prim_pointer {}
534534
/// [`Hash`]: hash::Hash
535535
/// [`Borrow`]: borrow::Borrow
536536
/// [`BorrowMut`]: borrow::BorrowMut
537-
///
537+
/// [slice pattern]: ../reference/patterns.html#slice-patterns
538538
#[stable(feature = "rust1", since = "1.0.0")]
539539
mod prim_array {}
540540

0 commit comments

Comments
 (0)