about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2024-12-17 23:59:38 +0000
committerTrevor Gross <tmgross@umich.edu>2025-04-03 19:20:59 +0000
commitac34a6fcd5229f1308e74c8a84a38dc4a27cee4b (patch)
tree4db3d89196c16a869df4c1f6a2fed36138abe16b
parent82eb03ec6220ee435e0e07fdaf3f0a68a79aab17 (diff)
downloadrust-ac34a6fcd5229f1308e74c8a84a38dc4a27cee4b.tar.gz
rust-ac34a6fcd5229f1308e74c8a84a38dc4a27cee4b.zip
Stabilize the `cell_update` feature
Included API:

    impl<T: Copy> Cell<T> {
        pub fn update(&self, f: impl FnOnce(T) -> T);
    }

Closes: https://github.com/rust-lang/rust/issues/50186
-rw-r--r--library/core/src/cell.rs4
-rw-r--r--library/coretests/tests/lib.rs1
-rw-r--r--src/tools/miri/src/lib.rs1
3 files changed, 1 insertions, 5 deletions
diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs
index 09117e4968d..e23a58eaece 100644
--- a/library/core/src/cell.rs
+++ b/library/core/src/cell.rs
@@ -549,8 +549,6 @@ impl<T: Copy> Cell<T> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(cell_update)]
-    ///
     /// use std::cell::Cell;
     ///
     /// let c = Cell::new(5);
@@ -558,7 +556,7 @@ impl<T: Copy> Cell<T> {
     /// assert_eq!(c.get(), 6);
     /// ```
     #[inline]
-    #[unstable(feature = "cell_update", issue = "50186")]
+    #[stable(feature = "cell_update", since = "CURRENT_RUSTC_VERSION")]
     pub fn update(&self, f: impl FnOnce(T) -> T) {
         let old = self.get();
         self.set(f(old));
diff --git a/library/coretests/tests/lib.rs b/library/coretests/tests/lib.rs
index 7ad154796f6..cec9430396e 100644
--- a/library/coretests/tests/lib.rs
+++ b/library/coretests/tests/lib.rs
@@ -12,7 +12,6 @@
 #![feature(async_iterator)]
 #![feature(bigint_helper_methods)]
 #![feature(bstr)]
-#![feature(cell_update)]
 #![feature(char_max_len)]
 #![feature(clone_to_uninit)]
 #![feature(const_eval_select)]
diff --git a/src/tools/miri/src/lib.rs b/src/tools/miri/src/lib.rs
index 03f76cfa652..f2cca7e1faf 100644
--- a/src/tools/miri/src/lib.rs
+++ b/src/tools/miri/src/lib.rs
@@ -1,6 +1,5 @@
 #![feature(rustc_private)]
 #![feature(cfg_match)]
-#![feature(cell_update)]
 #![feature(float_gamma)]
 #![feature(float_erf)]
 #![feature(map_try_insert)]