From 62649524b94fb83e2ed472088ea1a0cd87079fd2 Mon Sep 17 00:00:00 2001 From: Scott McMurray Date: Sat, 24 Mar 2018 20:41:20 -0700 Subject: [PATCH] Fix doctest mutability copy-pasta --- src/libcore/ptr.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 3fc8421d3b04..0723fa8a23d9 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -1516,7 +1516,7 @@ impl *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 { @@ -1554,7 +1554,7 @@ impl *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);