Skip to content

Commit

Permalink
Rollup merge of rust-lang#95384 - ehuss:doc-target_has_atomic-stabili…
Browse files Browse the repository at this point in the history
…zed, r=Dylan-DPC

Update target_has_atomic documentation for stabilization

`cfg(target_has_atomic)` was stabilized in rust-lang#93824, but this small note in the docs was not updated at the time.
  • Loading branch information
Dylan-DPC authored Mar 31, 2022
2 parents 521c590 + 182d4b3 commit eb0e8c3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions library/core/src/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
//!
Expand Down

0 comments on commit eb0e8c3

Please sign in to comment.