Skip to content

Commit 88f95e2

Browse files
committed
Stabilize 'atomic_from_ptr', move const gate to 'const_atomic_from_ptr'
1 parent 066265a commit 88f95e2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Diff for: library/core/src/sync/atomic.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ impl AtomicBool {
319319
/// # Examples
320320
///
321321
/// ```
322-
/// #![feature(atomic_from_ptr, pointer_is_aligned)]
322+
/// #![feature(pointer_is_aligned)]
323323
/// use std::sync::atomic::{self, AtomicBool};
324324
/// use std::mem::align_of;
325325
///
@@ -354,8 +354,8 @@ impl AtomicBool {
354354
/// thread).
355355
///
356356
/// [valid]: crate::ptr#safety
357-
#[unstable(feature = "atomic_from_ptr", issue = "108652")]
358-
#[rustc_const_unstable(feature = "atomic_from_ptr", issue = "108652")]
357+
#[stable(feature = "atomic_from_ptr", since = "CURRENT_RUSTC_VERSION")]
358+
#[rustc_const_unstable(feature = "const_atomic_from_ptr", issue = "108652")]
359359
pub const unsafe fn from_ptr<'a>(ptr: *mut bool) -> &'a AtomicBool {
360360
// SAFETY: guaranteed by the caller
361361
unsafe { &*ptr.cast() }
@@ -1116,7 +1116,7 @@ impl<T> AtomicPtr<T> {
11161116
/// # Examples
11171117
///
11181118
/// ```
1119-
/// #![feature(atomic_from_ptr, pointer_is_aligned)]
1119+
/// #![feature(pointer_is_aligned)]
11201120
/// use std::sync::atomic::{self, AtomicPtr};
11211121
/// use std::mem::align_of;
11221122
///
@@ -1151,8 +1151,8 @@ impl<T> AtomicPtr<T> {
11511151
/// thread).
11521152
///
11531153
/// [valid]: crate::ptr#safety
1154-
#[unstable(feature = "atomic_from_ptr", issue = "108652")]
1155-
#[rustc_const_unstable(feature = "atomic_from_ptr", issue = "108652")]
1154+
#[stable(feature = "atomic_from_ptr", since = "CURRENT_RUSTC_VERSION")]
1155+
#[rustc_const_unstable(feature = "const_atomic_from_ptr", issue = "108652")]
11561156
pub const unsafe fn from_ptr<'a>(ptr: *mut *mut T) -> &'a AtomicPtr<T> {
11571157
// SAFETY: guaranteed by the caller
11581158
unsafe { &*ptr.cast() }
@@ -2089,7 +2089,7 @@ macro_rules! atomic_int {
20892089
/// # Examples
20902090
///
20912091
/// ```
2092-
/// #![feature(atomic_from_ptr, pointer_is_aligned)]
2092+
/// #![feature(pointer_is_aligned)]
20932093
#[doc = concat!($extra_feature, "use std::sync::atomic::{self, ", stringify!($atomic_type), "};")]
20942094
/// use std::mem::align_of;
20952095
///
@@ -2126,8 +2126,8 @@ macro_rules! atomic_int {
21262126
/// is used in a `Sync` context (e.g. read or modified in a different thread).
21272127
///
21282128
/// [valid]: crate::ptr#safety
2129-
#[unstable(feature = "atomic_from_ptr", issue = "108652")]
2130-
#[rustc_const_unstable(feature = "atomic_from_ptr", issue = "108652")]
2129+
#[stable(feature = "atomic_from_ptr", since = "CURRENT_RUSTC_VERSION")]
2130+
#[rustc_const_unstable(feature = "const_atomic_from_ptr", issue = "108652")]
21312131
pub const unsafe fn from_ptr<'a>(ptr: *mut $int_type) -> &'a $atomic_type {
21322132
// SAFETY: guaranteed by the caller
21332133
unsafe { &*ptr.cast() }

0 commit comments

Comments
 (0)