diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index da56b21cf0c..7a3c9bc3bb2 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -520,7 +520,7 @@ impl Vec { #[inline] #[stable(feature = "vec_as_slice", since = "1.7.0")] pub fn as_mut_slice(&mut self) -> &mut [T] { - &mut self[..] + self } /// Sets the length of a vector.