We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 458aaba commit 3be40b2Copy full SHA for 3be40b2
library/core/src/sync/atomic.rs
@@ -858,7 +858,7 @@ impl<T> AtomicPtr<T> {
858
#[inline]
859
#[unstable(feature = "atomic_from_mut", issue = "76314")]
860
pub fn from_mut(v: &mut *mut T) -> &Self {
861
- let [] = [(); align_of::<Self>() - align_of::<*mut T>()];
+ let [] = [(); align_of::<AtomicPtr<()>>() - align_of::<*mut ()>()];
862
// SAFETY:
863
// - the mutable reference guarantees unique ownership.
864
// - the alignment of `*mut T` and `Self` is the same on all platforms
0 commit comments