about summary refs log tree commit diff
path: root/src/libcore/mem
diff options
context:
space:
mode:
authorJon Gjengset <jon@thesquareplanet.com>2019-09-23 13:54:37 -0400
committerJon Gjengset <jon@thesquareplanet.com>2019-10-08 18:04:18 -0400
commit45aca119a6c94a2c408fb6da7a47d363ab852bac (patch)
treefe3b55fc7f4efde0e180e02797f26a6ff1c2adca /src/libcore/mem
parent2748a9fd93dd1a00a4521f4f16de5befbf77f6cd (diff)
downloadrust-45aca119a6c94a2c408fb6da7a47d363ab852bac.tar.gz
rust-45aca119a6c94a2c408fb6da7a47d363ab852bac.zip
Stabilize mem::take (mem_take)
Tracking issue: https://github.com/rust-lang/rust/issues/61129
Diffstat (limited to 'src/libcore/mem')
-rw-r--r--src/libcore/mem/mod.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libcore/mem/mod.rs b/src/libcore/mem/mod.rs
index 95ad4272ced..23608931b1d 100644
--- a/src/libcore/mem/mod.rs
+++ b/src/libcore/mem/mod.rs
@@ -520,8 +520,6 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
 /// A simple example:
 ///
 /// ```
-/// #![feature(mem_take)]
-///
 /// use std::mem;
 ///
 /// let mut v: Vec<i32> = vec![1, 2];
@@ -552,8 +550,6 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
 /// `self`, allowing it to be returned:
 ///
 /// ```
-/// #![feature(mem_take)]
-///
 /// use std::mem;
 ///
 /// # struct Buffer<T> { buf: Vec<T> }
@@ -572,7 +568,7 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
 ///
 /// [`Clone`]: ../../std/clone/trait.Clone.html
 #[inline]
-#[unstable(feature = "mem_take", issue = "61129")]
+#[stable(feature = "mem_take", since = "1.40.0")]
 pub fn take<T: Default>(dest: &mut T) -> T {
     replace(dest, T::default())
 }