about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2020-11-22 23:00:58 +0100
committerGitHub <noreply@github.com>2020-11-22 23:00:58 +0100
commitb249844c33f5327cbba7a13d34eaaf290f0ec776 (patch)
tree721d1adf9be7fe7654b0f37fdaefccc7ca306812
parent186ec64947a0207fef811bfefb19453068e3d87d (diff)
parent5c6689baff9c8d301ebe5412c3ed123122b696dc (diff)
downloadrust-b249844c33f5327cbba7a13d34eaaf290f0ec776.tar.gz
rust-b249844c33f5327cbba7a13d34eaaf290f0ec776.zip
Rollup merge of #78608 - ThinkChaos:stabilize_refcell_take, r=m-ou-se
Stabilize refcell_take

Tracking Issue: #71395

``@KodrAus`` nominated this for FCP, so here's a PR!
I've never made a stabilization PR, so please mention if there's anything I can improve, thanks.
-rw-r--r--library/core/src/cell.rs3
-rw-r--r--library/std/src/lib.rs1
2 files changed, 1 insertions, 3 deletions
diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs
index b2afb702eeb..e1b6307613b 100644
--- a/library/core/src/cell.rs
+++ b/library/core/src/cell.rs
@@ -1027,7 +1027,6 @@ impl<T: Default> RefCell<T> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(refcell_take)]
     /// use std::cell::RefCell;
     ///
     /// let c = RefCell::new(5);
@@ -1036,7 +1035,7 @@ impl<T: Default> RefCell<T> {
     /// assert_eq!(five, 5);
     /// assert_eq!(c.into_inner(), 0);
     /// ```
-    #[unstable(feature = "refcell_take", issue = "71395")]
+    #[stable(feature = "refcell_take", since = "1.50.0")]
     pub fn take(&self) -> T {
         self.replace(Default::default())
     }
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index d2f36309e2d..72f19fdce5e 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -297,7 +297,6 @@
 #![feature(raw)]
 #![feature(raw_ref_macros)]
 #![feature(ready_macro)]
-#![feature(refcell_take)]
 #![feature(rustc_attrs)]
 #![feature(rustc_private)]
 #![feature(shrink_to)]