diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs index 30a42d4eb5e64..a3ceac89ef128 100644 --- a/library/core/src/sync/atomic.rs +++ b/library/core/src/sync/atomic.rs @@ -1558,6 +1558,8 @@ impl AtomicPtr { /// Gets atomic access to a pointer. /// + /// **Note:** This function is only available on targets where `AtomicPtr` has the same alignment as `*const T` + /// /// # Examples /// /// ``` @@ -1625,6 +1627,8 @@ impl AtomicPtr { /// Gets atomic access to a slice of pointers. /// + /// **Note:** This function is only available on targets where `AtomicPtr` has the same alignment as `*const T` + /// /// # Examples /// /// ```ignore-wasm @@ -2804,6 +2808,14 @@ macro_rules! atomic_int { #[doc = concat!("Get atomic access to a `&mut [", stringify!($int_type), "]` slice.")] /// + #[doc = if_8_bit! { + $int_type, + no = [ + "**Note:** This function is only available on targets where `", + stringify!($atomic_type), "` has the same alignment as `", stringify!($int_type), "`." + ], + }] + /// /// # Examples /// /// ```ignore-wasm