Skip to content

Commit

Permalink
Stabilize atomic_as_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Feb 24, 2023
1 parent 07c993e commit 318be2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
13 changes: 7 additions & 6 deletions library/core/src/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
/// }
Expand All @@ -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()
}
Expand Down Expand Up @@ -1802,7 +1804,6 @@ impl<T> AtomicPtr<T> {
/// # Examples
///
/// ```ignore (extern-declaration)
/// #![feature(atomic_mut_ptr)]
/// use std::sync::atomic::AtomicPtr;
///
/// extern "C" {
Expand All @@ -1818,7 +1819,8 @@ impl<T> AtomicPtr<T> {
/// }
/// ```
#[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()
}
Expand Down Expand Up @@ -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()
}
Expand Down
1 change: 0 additions & 1 deletion library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@
#![feature(utf8_chunks)]
//
// Library features (core):
#![feature(atomic_mut_ptr)]
#![feature(char_internals)]
#![feature(core_intrinsics)]
#![feature(duration_constants)]
Expand Down

0 comments on commit 318be2b

Please sign in to comment.