]> git.lizzy.rs Git - rust.git/commitdiff
Update target_has_atomic documentation for stabilization
authorEric Huss <eric@huss.org>
Sun, 27 Mar 2022 22:13:17 +0000 (15:13 -0700)
committerEric Huss <eric@huss.org>
Sun, 27 Mar 2022 22:13:17 +0000 (15:13 -0700)
library/core/src/sync/atomic.rs

index a9edec80540dd1d375292c398c45bd9dd0d2605e..c11a35ab947a808160bd1051916664ee3c71b239 100644 (file)
 //! For reference, the `std` library requires `AtomicBool`s and pointer-sized atomics, although
 //! `core` does not.
 //!
-//! Currently you'll need to use `#[cfg(target_arch)]` primarily to
-//! conditionally compile in code with atomics. There is an unstable
-//! `#[cfg(target_has_atomic)]` as well which may be stabilized in the future.
+//! The `#[cfg(target_has_atomic)]` attribute can be used to conditionally
+//! compile based on the target's supported bit widths. It is a key-value
+//! option set for each supported size, with values "8", "16", "32", "64",
+//! "128", and "ptr" for pointer-sized atomics.
 //!
 //! [lock-free]: https://en.wikipedia.org/wiki/Non-blocking_algorithm
 //!