From 318be2bee9259852bc95728269916a45f59fa5aa Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Thu, 23 Feb 2023 23:29:10 -0500 Subject: [PATCH] Stabilize atomic_as_ptr --- library/core/src/sync/atomic.rs | 13 +++++++------ library/std/src/lib.rs | 1 - 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs index 00bcaf3e18c3d..c79b9801a9d33 100644 --- a/library/core/src/sync/atomic.rs +++ b/library/core/src/sync/atomic.rs @@ -916,6 +916,7 @@ impl AtomicBool { /// ```ignore (extern-declaration) /// # fn main() { /// use std::sync::atomic::AtomicBool; + /// /// extern "C" { /// fn my_atomic_op(arg: *mut bool); /// } @@ -927,7 +928,8 @@ impl AtomicBool { /// # } /// ``` #[inline] - #[unstable(feature = "atomic_mut_ptr", reason = "recently added", issue = "66893")] + #[stable(feature = "atomic_as_ptr", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "atomic_as_ptr", since = "CURRENT_RUSTC_VERSION")] pub const fn as_ptr(&self) -> *mut bool { self.v.get().cast() } @@ -1802,7 +1804,6 @@ impl AtomicPtr { /// # Examples /// /// ```ignore (extern-declaration) - /// #![feature(atomic_mut_ptr)] /// use std::sync::atomic::AtomicPtr; /// /// extern "C" { @@ -1818,7 +1819,8 @@ impl AtomicPtr { /// } /// ``` #[inline] - #[unstable(feature = "atomic_mut_ptr", reason = "recently added", issue = "66893")] + #[stable(feature = "atomic_as_ptr", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "atomic_as_ptr", since = "CURRENT_RUSTC_VERSION")] pub const fn as_ptr(&self) -> *mut *mut T { self.p.get() } @@ -2724,9 +2726,8 @@ macro_rules! atomic_int { /// # } /// ``` #[inline] - #[unstable(feature = "atomic_mut_ptr", - reason = "recently added", - issue = "66893")] + #[stable(feature = "atomic_as_ptr", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "atomic_as_ptr", since = "CURRENT_RUSTC_VERSION")] pub const fn as_ptr(&self) -> *mut $int_type { self.v.get() } diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 363a266717467..d772b188c7360 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -273,7 +273,6 @@ #![feature(utf8_chunks)] // // Library features (core): -#![feature(atomic_mut_ptr)] #![feature(char_internals)] #![feature(core_intrinsics)] #![feature(duration_constants)]