]> git.lizzy.rs Git - rust.git/blobdiff - src/libcollections/vec.rs
Stabilize `std::convert` and related code
[rust.git] / src / libcollections / vec.rs
index 14bc7f65e096020afd05cfc635abd91993a7b1c7..6ee7b0a86c8edaa3a5073a8da8bb8f6b6178c01d 100644 (file)
@@ -423,11 +423,18 @@ pub fn truncate(&mut self, len: usize) {
         }
     }
 
+    /// Extract a slice containing the entire vector.
+    #[inline]
+    #[unstable(feature = "convert",
+               reason = "waiting on RFC revision")]
+    pub fn as_slice(&self) -> &[T] {
+        self
+    }
+
     /// Deprecated: use `&mut s[..]` instead.
     #[inline]
-    #[unstable(feature = "collections",
-               reason = "will be replaced by slice syntax")]
-    #[deprecated(since = "1.0.0", reason = "use &mut s[..] instead")]
+    #[unstable(feature = "convert",
+               reason = "waiting on RFC revision")]
     pub fn as_mut_slice(&mut self) -> &mut [T] {
         &mut self[..]
     }
@@ -1640,13 +1647,6 @@ fn as_ref(&self) -> &Vec<T> {
     }
 }
 
-#[stable(feature = "rust1", since = "1.0.0")]
-impl<T> Into<Vec<T>> for Vec<T> {
-    fn into(self) -> Vec<T> {
-        self
-    }
-}
-
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> AsRef<[T]> for Vec<T> {
     fn as_ref(&self) -> &[T] {