Skip to content

Commit

Permalink
Fix doctest mutability copy-pasta
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmcm committed Mar 25, 2018
1 parent 4a097ea commit 6264952
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,7 @@ impl<T: ?Sized> *mut T {
/// ```
/// #![feature(ptr_offset_from)]
///
/// let a = [0; 5];
/// let mut a = [0; 5];
/// let ptr1: *mut i32 = &mut a[1];
/// let ptr2: *mut i32 = &mut a[3];
/// unsafe {
Expand Down Expand Up @@ -1554,7 +1554,7 @@ impl<T: ?Sized> *mut T {
/// ```
/// #![feature(ptr_wrapping_offset_from)]
///
/// let a = [0; 5];
/// let mut a = [0; 5];
/// let ptr1: *mut i32 = &mut a[1];
/// let ptr2: *mut i32 = &mut a[3];
/// assert_eq!(ptr2.wrapping_offset_from(ptr1), 2);
Expand Down

0 comments on commit 6264952

Please sign in to comment.