Skip to content

Commit

Permalink
Rollup merge of #76164 - lzutao:slice-array, r=ehuss
Browse files Browse the repository at this point in the history
Link to slice pattern in array docs

Fix a todo in rust-lang/reference#739 (comment)
  • Loading branch information
Dylan-DPC authored Sep 3, 2020
2 parents 9605f94 + a74d4e4 commit 3e156cf
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 @@ -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
Expand Down Expand Up @@ -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. */ }
Expand All @@ -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 {}

Expand Down

0 comments on commit 3e156cf

Please sign in to comment.