about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-03-31 17:29:53 +0200
committerGitHub <noreply@github.com>2022-03-31 17:29:53 +0200
commiteb0e8c3418fd4f89743b5b12c84e4f683748ea1a (patch)
tree191d487acfbe22ef9e94548bb16e6abbcabf3905
parent521c590c9f780227f3f6284cbecb727f121a9cb4 (diff)
parent182d4b32d506bb061f30069fcb38090c11f08775 (diff)
downloadrust-eb0e8c3418fd4f89743b5b12c84e4f683748ea1a.tar.gz
rust-eb0e8c3418fd4f89743b5b12c84e4f683748ea1a.zip
Rollup merge of #95384 - ehuss:doc-target_has_atomic-stabilized, r=Dylan-DPC
Update target_has_atomic documentation for stabilization

`cfg(target_has_atomic)` was stabilized in #93824, but this small note in the docs was not updated at the time.
-rw-r--r--library/core/src/sync/atomic.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs
index a9edec80540..c11a35ab947 100644
--- a/library/core/src/sync/atomic.rs
+++ b/library/core/src/sync/atomic.rs
@@ -65,9 +65,10 @@
 //! 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
 //!