diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 1f8fd32da9ab8..c45518438bd83 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -1958,7 +1958,7 @@ impl IntoIter { /// assert_eq!(into_iter.next().unwrap(), 'z'); /// ``` #[stable(feature = "vec_into_iter_as_slice", since = "1.15.0")] - pub fn as_mut_slice(&self) -> &mut [T] { + pub fn as_mut_slice(&mut self) -> &mut [T] { unsafe { slice::from_raw_parts_mut(self.ptr as *mut T, self.len()) }