Skip to content

Commit dc6b134

Browse files
committed
Clarified docs on non-atomic oprations on owned/mut refs to atomics
1 parent 81b757c commit dc6b134

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/sync/atomic.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
//! Basically, creating a *shared reference* to one of the Rust atomic types corresponds to creating
2929
//! an `atomic_ref` in C++; the `atomic_ref` is destroyed when the lifetime of the shared reference
3030
//! ends. (A Rust atomic type that is exclusively owned or behind a mutable reference does *not*
31-
//! correspond to an "atomic object" in C++, since it can be accessed via non-atomic operations.)
31+
//! correspond to an “atomic object” in C++, since the underlying primitive can be mutably accessed
32+
//! with `get_mut to perform non-atomic operations.)
3233
//!
3334
//! [cpp]: https://en.cppreference.com/w/cpp/atomic
3435
//!

0 commit comments

Comments
 (0)