From 9b97264d81bfb39f55d645f5c1cccb790dfd9d58 Mon Sep 17 00:00:00 2001
From: Ulrik Sverdrup <bluss@users.noreply.github.com>
Date: Fri, 25 Sep 2015 17:43:58 +0200
Subject: [PATCH] Implement AsMut for Vec

Fixes #28549
---
 src/libcollections/vec.rs | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index c99460a55c952..6375fa489ee2f 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -1359,6 +1359,13 @@ impl<T> AsRef<[T]> for Vec<T> {
     }
 }
 
+#[stable(feature = "vec_as_mut", since = "1.5.0")]
+impl<T> AsMut<[T]> for Vec<T> {
+    fn as_mut(&mut self) -> &mut [T] {
+        self
+    }
+}
+
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, T: Clone> From<&'a [T]> for Vec<T> {
     #[cfg(not(test))]