core docs: add notes about availability of Atomic*::from_mut_slice

This commit is contained in:
Waffle Lapkin
2025-11-06 15:22:30 +01:00
parent c9537a94a6
commit 893f0d2cff
+12
View File
@@ -1558,6 +1558,8 @@ pub fn get_mut(&mut self) -> &mut *mut T {
/// Gets atomic access to a pointer.
///
/// **Note:** This function is only available on targets where `AtomicPtr<T>` has the same alignment as `*const T`
///
/// # Examples
///
/// ```
@@ -1625,6 +1627,8 @@ pub fn get_mut_slice(this: &mut [Self]) -> &mut [*mut T] {
/// Gets atomic access to a slice of pointers.
///
/// **Note:** This function is only available on targets where `AtomicPtr<T>` has the same alignment as `*const T`
///
/// # Examples
///
/// ```ignore-wasm
@@ -2804,6 +2808,14 @@ pub fn get_mut_slice(this: &mut [Self]) -> &mut [$int_type] {
#[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