Skip to content

Commit

Permalink
Rollup merge of rust-lang#57450 - steveklabnik:gh45678, r=KodrAus
Browse files Browse the repository at this point in the history
actually take a slice in this example

Fixes rust-lang#45678
  • Loading branch information
Centril committed Jan 12, 2019
2 parents 85a7fc8 + 4a454d6 commit 0b1427e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/libstd/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,6 @@ mod prim_array { }
#[doc(alias = "[")]
#[doc(alias = "]")]
#[doc(alias = "[]")]
//
/// A dynamically-sized view into a contiguous sequence, `[T]`.
///
/// *[See also the `std::slice` module](slice/index.html).*
Expand All @@ -572,11 +571,11 @@ mod prim_array { }
/// points to:
///
/// ```
/// let x = &mut [1, 2, 3];
/// let mut x = [1, 2, 3];
/// let x = &mut x[..]; // Take a full slice of `x`.
/// x[1] = 7;
/// assert_eq!(x, &[1, 7, 3]);
/// ```
///
#[stable(feature = "rust1", since = "1.0.0")]
mod prim_slice { }

Expand Down

0 comments on commit 0b1427e

Please sign in to comment.