We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a097ea commit 6264952Copy full SHA for 6264952
src/libcore/ptr.rs
@@ -1516,7 +1516,7 @@ impl<T: ?Sized> *mut T {
1516
/// ```
1517
/// #![feature(ptr_offset_from)]
1518
///
1519
- /// let a = [0; 5];
+ /// let mut a = [0; 5];
1520
/// let ptr1: *mut i32 = &mut a[1];
1521
/// let ptr2: *mut i32 = &mut a[3];
1522
/// unsafe {
@@ -1554,7 +1554,7 @@ impl<T: ?Sized> *mut T {
1554
1555
/// #![feature(ptr_wrapping_offset_from)]
1556
1557
1558
1559
1560
/// assert_eq!(ptr2.wrapping_offset_from(ptr1), 2);
0 commit comments