-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Location
https://doc.rust-lang.org/nightly/core/sync/atomic/struct.AtomicBool.html
Summary
The introductory section for AtomicBool
states:
This type has the same size, alignment, and bit validity as a bool.
But later the safety requirements for from_ptr
state:
ptr
must be aligned toalign_of::<AtomicBool>()
(note that on some platforms this can be bigger thanalign_of::<bool>()
).
This seems to be a contradiction. If AtomicBool has the same alignment as bool
then how can align_of::<AtomicBool>()
be bigger than align_of::<bool>()
.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.