Skip to content

Commit 56459c7

Browse files
committed
Stabilize 'atomic_from_ptr', move const gate to 'const_atomic_from_ptr'
1 parent 6d48177 commit 56459c7

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() }
@@ -1115,7 +1115,7 @@ impl<T> AtomicPtr<T> {
11151115
/// # Examples
11161116
///
11171117
/// ```
1118-
/// #![feature(atomic_from_ptr, pointer_is_aligned)]
1118+
/// #![feature(pointer_is_aligned)]
11191119
/// use std::sync::atomic::{self, AtomicPtr};
11201120
/// use std::mem::align_of;
11211121
///
@@ -1150,8 +1150,8 @@ impl<T> AtomicPtr<T> {
11501150
/// thread).
11511151
///
11521152
/// [valid]: crate::ptr#safety
1153-
#[unstable(feature = "atomic_from_ptr", issue = "108652")]
1154-
#[rustc_const_unstable(feature = "atomic_from_ptr", issue = "108652")]
1153+
#[stable(feature = "atomic_from_ptr", since = "CURRENT_RUSTC_VERSION")]
1154+
#[rustc_const_unstable(feature = "const_atomic_from_ptr", issue = "108652")]
11551155
pub const unsafe fn from_ptr<'a>(ptr: *mut *mut T) -> &'a AtomicPtr<T> {
11561156
// SAFETY: guaranteed by the caller
11571157
unsafe { &*ptr.cast() }
@@ -2087,7 +2087,7 @@ macro_rules! atomic_int {
20872087
/// # Examples
20882088
///
20892089
/// ```
2090-
/// #![feature(atomic_from_ptr, pointer_is_aligned)]
2090+
/// #![feature(pointer_is_aligned)]
20912091
#[doc = concat!($extra_feature, "use std::sync::atomic::{self, ", stringify!($atomic_type), "};")]
20922092
/// use std::mem::align_of;
20932093
///
@@ -2124,8 +2124,8 @@ macro_rules! atomic_int {
21242124
/// is used in a `Sync` context (e.g. read or modified in a different thread).
21252125
///
21262126
/// [valid]: crate::ptr#safety
2127-
#[unstable(feature = "atomic_from_ptr", issue = "108652")]
2128-
#[rustc_const_unstable(feature = "atomic_from_ptr", issue = "108652")]
2127+
#[stable(feature = "atomic_from_ptr", since = "CURRENT_RUSTC_VERSION")]
2128+
#[rustc_const_unstable(feature = "const_atomic_from_ptr", issue = "108652")]
21292129
pub const unsafe fn from_ptr<'a>(ptr: *mut $int_type) -> &'a $atomic_type {
21302130
// SAFETY: guaranteed by the caller
21312131
unsafe { &*ptr.cast() }

0 commit comments

Comments
 (0)