Skip to content

Commit b742c8d

Browse files
authored
Rollup merge of #121977 - Lee-Janggun:master, r=WaffleLapkin
Doc: Fix incorrect reference to integer in Atomic{Ptr,Bool}::as_ptr. I am assuming "resulting integer" is an error, since we are talking about pointers and booleans here. Seems like it was missed while copy & pasting the docs from the integer versions. I also checked the rest of the docs, and this was the only mention of integers.
2 parents 99c4935 + 05e68fa commit b742c8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/sync/atomic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ impl AtomicBool {
10921092

10931093
/// Returns a mutable pointer to the underlying [`bool`].
10941094
///
1095-
/// Doing non-atomic reads and writes on the resulting integer can be a data race.
1095+
/// Doing non-atomic reads and writes on the resulting boolean can be a data race.
10961096
/// This method is mostly useful for FFI, where the function signature may use
10971097
/// `*mut bool` instead of `&AtomicBool`.
10981098
///
@@ -2031,7 +2031,7 @@ impl<T> AtomicPtr<T> {
20312031

20322032
/// Returns a mutable pointer to the underlying pointer.
20332033
///
2034-
/// Doing non-atomic reads and writes on the resulting integer can be a data race.
2034+
/// Doing non-atomic reads and writes on the resulting pointer can be a data race.
20352035
/// This method is mostly useful for FFI, where the function signature may use
20362036
/// `*mut *mut T` instead of `&AtomicPtr<T>`.
20372037
///

0 commit comments

Comments
 (0)