Open
Description
Feature gate: #![feature(atomic_from_ptr)]
, #![feature(const_atomic_from_ptr)]
This is a tracking issue for Atomic*::from_ptr
set of functions.
Public API
// core::atomic
impl AtomicBool { pub const unsafe fn from_ptr<'a>(ptr: *mut bool) -> &'a AtomicBool; }
impl<T> AtomicPtr<T> { pub const unsafe fn from_ptr<'a>(ptr: *mut *mut T) -> &'a AtomicPtr<T>; }
impl AtomicU8 { pub const unsafe fn from_ptr<'a>(ptr: *mut u8) -> &'a AtomicU8; }
impl AtomicU16 { pub const unsafe fn from_ptr<'a>(ptr: *mut u16) -> &'a AtomicU16; }
impl AtomicU32 { pub const unsafe fn from_ptr<'a>(ptr: *mut u32) -> &'a AtomicU32; }
impl AtomicU64 { pub const unsafe fn from_ptr<'a>(ptr: *mut u64) -> &'a AtomicU64; }
impl AtomicUsize { pub const unsafe fn from_ptr<'a>(ptr: *mut usize) -> &'a AtomicUsize; }
impl AtomicI8 { pub const unsafe fn from_ptr<'a>(ptr: *mut i8) -> &'a AtomicI8; }
impl AtomicI16 { pub const unsafe fn from_ptr<'a>(ptr: *mut i16) -> &'a AtomicI16; }
impl AtomicI32 { pub const unsafe fn from_ptr<'a>(ptr: *mut i32) -> &'a AtomicI32; }
impl AtomicI64 { pub const unsafe fn from_ptr<'a>(ptr: *mut i64) -> &'a AtomicI64; }
impl AtomicIsize { pub const unsafe fn from_ptr<'a>(ptr: *mut isize) -> &'a AtomicIsize; }
Steps / History
- Implementation: Add
Atomic*::from_ptr
#108540Final comment period (FCP)1Stabilization PR - Stabilizeatomic_from_ptr
#115719
Unresolved Questions
- None yet.
Footnotes
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
tgross35 commentedon Sep 9, 2023
I think there is a duplication in the docs, I think the bool line shouldn't be there?
Other than that, do you have any opposition to me opening a stabilization PR @WaffleLapkin? This hasn't been around super long but it seems uncontroversial, and mirrors
as_ptr
.WaffleLapkin commentedon Sep 9, 2023
@tgross35 I have no opposition, however do note that the decision here is on the libs-api team =)
you may want to reach out to them in the zulip for example
atomic_from_ptr
#115719tgross35 commentedon Sep 9, 2023
Rightieo, this change is small enough that I opened #115719 to get the ball rolling
Auto merge of rust-lang#115719 - tgross35:atomic-from-ptr, r=dtolnay
Dylan-DPC commentedon Mar 7, 2024
Stabilised in #115719
[-]Tracking Issue for `Atomic*::from_ptr`[/-][+]Tracking Issue for `Atomic*::from_ptr` and `const_atomic_from_ptr`[/+]tgross35 commentedon Oct 14, 2024
Reopening this since the const gate still points here
Stabilize `const_atomic_from_ptr`
Stabilize `const_atomic_from_ptr`
Stabilize `const_atomic_from_ptr`
Stabilize `const_atomic_from_ptr`