diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 39cf2ec4c21..5992656ed25 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -1833,7 +1833,7 @@ pub unsafe fn copy_to_nonoverlapping(self, dest: *mut T, count: usize) /// /// # #[allow(dead_code)] /// unsafe fn from_buf_raw(ptr: *const T, elts: usize) -> Vec { - /// let mut dst = Vec::with_capacity(elts); + /// let mut dst: Vec = Vec::with_capacity(elts); /// dst.set_len(elts); /// dst.as_mut_ptr().copy_from(ptr, elts); /// dst @@ -1872,7 +1872,7 @@ pub unsafe fn copy_from(self, src: *const T, count: usize) /// /// # #[allow(dead_code)] /// unsafe fn from_buf_raw(ptr: *const T, elts: usize) -> Vec { - /// let mut dst = Vec::with_capacity(elts); + /// let mut dst: Vec = Vec::with_capacity(elts); /// dst.set_len(elts); /// dst.as_mut_ptr().copy_from_nonoverlapping(ptr, elts); /// dst