From ac34a6fcd5229f1308e74c8a84a38dc4a27cee4b Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Tue, 17 Dec 2024 23:59:38 +0000 Subject: [PATCH] Stabilize the `cell_update` feature Included API: impl Cell { pub fn update(&self, f: impl FnOnce(T) -> T); } Closes: https://github.com/rust-lang/rust/issues/50186 --- library/core/src/cell.rs | 4 +--- library/coretests/tests/lib.rs | 1 - src/tools/miri/src/lib.rs | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs index 09117e4968db6..e23a58eaece26 100644 --- a/library/core/src/cell.rs +++ b/library/core/src/cell.rs @@ -549,8 +549,6 @@ impl Cell { /// # Examples /// /// ``` - /// #![feature(cell_update)] - /// /// use std::cell::Cell; /// /// let c = Cell::new(5); @@ -558,7 +556,7 @@ impl Cell { /// 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 7ad154796f649..cec9430396e9a 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 03f76cfa6524c..f2cca7e1faf13 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)]