Update safety docs for AtomicBool::from_ptr. · model-checking/verify-rust-std@263861f (original) (raw)

Original file line number Diff line number Diff line change
@@ -443,8 +443,8 @@ impl AtomicBool {
443 443 ///
444 444 /// # Safety
445 445 ///
446 - /// * `ptr` must be aligned to `align_of::()` (note that on some platforms this can
447 - /// be bigger than `align_of::<bool>()`).
446 + /// * `ptr` must be aligned to `align_of::()` (note that this is always true, since
447 + /// `align_of::<AtomicBool>() == 1`).
448 448 /// * `ptr` must be [valid] for both reads and writes for the whole lifetime `'a`.
449 449 /// * You must adhere to the [Memory model for atomic accesses]. In particular, it is not
450 450 /// allowed to mix atomic and non-atomic accesses, or atomic accesses of different sizes,