Skip to content

Commit

Permalink
Fix slice::as_ptr_range doctest.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Oct 25, 2019
1 parent de9b660 commit 225b245
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libcore/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,12 @@ impl<T> [T] {
/// refers to an element of this slice:
///
/// ```
/// let a = [1,2,3];
/// #![feature(slice_ptr_range)]
///
/// let a = [1, 2, 3];
/// let x = &a[1];
/// let y = &5;
///
/// assert!(a.as_ptr_range().contains(x));
/// assert!(!a.as_ptr_range().contains(y));
/// ```
Expand Down

0 comments on commit 225b245

Please sign in to comment.