Skip to content

Commit 182d4b3

Browse files
committed
Update target_has_atomic documentation for stabilization
1 parent ab0c2e1 commit 182d4b3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

library/core/src/sync/atomic.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@
6565
//! For reference, the `std` library requires `AtomicBool`s and pointer-sized atomics, although
6666
//! `core` does not.
6767
//!
68-
//! Currently you'll need to use `#[cfg(target_arch)]` primarily to
69-
//! conditionally compile in code with atomics. There is an unstable
70-
//! `#[cfg(target_has_atomic)]` as well which may be stabilized in the future.
68+
//! The `#[cfg(target_has_atomic)]` attribute can be used to conditionally
69+
//! compile based on the target's supported bit widths. It is a key-value
70+
//! option set for each supported size, with values "8", "16", "32", "64",
71+
//! "128", and "ptr" for pointer-sized atomics.
7172
//!
7273
//! [lock-free]: https://en.wikipedia.org/wiki/Non-blocking_algorithm
7374
//!

0 commit comments

Comments
 (0)