AtomicUsize::from_mut
has incorrect alignment requirements in docs
#133342
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-help-wanted
Call for participation: Help is requested to fix this issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Location
core::sync::atomic::AtomicUsize::from_mut
core::sync::atomic::AtomicIsize::from_mut
Summary
The documentation for
AtomicUsize::from_mut
claims that it's only available whenusize
has alignment 8, but in reality it's available whenusize
has alignment equal to its size (AFAICT), which is different on non-64-bit platforms. For example, this code compiles on 32-bit Linux:Godbolt
The text was updated successfully, but these errors were encountered: