Skip to content

Commit

Permalink
Link to slice pattern in array docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Aug 31, 2020
1 parent 3b4797c commit a74d4e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/std/src/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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. */ }
Expand All @@ -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 {}

Expand Down

0 comments on commit a74d4e4

Please sign in to comment.