Add missing docs

This commit is contained in:
Guillaume Gomez 2018-12-22 11:59:06 +01:00 committed by gnzlbg
parent 9ab261c3d7
commit 795eda878c

View file

@ -2,6 +2,8 @@
//! architecture. These macros provide a better error messages when the user
//! attempts to call them in a different architecture.
/// Prevents compilation if `is_x86_feature_detected` is used somewhere
/// else than `x86` and `x86_64` targets.
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]
@ -21,6 +23,8 @@ macro_rules! is_x86_feature_detected {
};
}
/// Prevents compilation if `is_arm_feature_detected` is used somewhere else
/// than `ARM` targets.
#[cfg(not(target_arch = "arm"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]
@ -40,6 +44,8 @@ macro_rules! is_arm_feature_detected {
};
}
/// Prevents compilation if `is_aarch64_feature_detected` is used somewhere else
/// than `aarch64` targets.
#[cfg(not(target_arch = "aarch64"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]
@ -59,6 +65,8 @@ macro_rules! is_aarch64_feature_detected {
};
}
/// Prevents compilation if `is_powerpc_feature_detected` is used somewhere else
/// than `PowerPC` targets.
#[cfg(not(target_arch = "powerpc"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]
@ -78,6 +86,8 @@ guarding it behind a cfg(target_arch) as follows:
};
}
/// Prevents compilation if `is_powerpc64_feature_detected` is used somewhere
/// else than `PowerPC64` targets.
#[cfg(not(target_arch = "powerpc64"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]
@ -97,6 +107,8 @@ guarding it behind a cfg(target_arch) as follows:
};
}
/// Prevents compilation if `is_mips_feature_detected` is used somewhere else
/// than `MIPS` targets.
#[cfg(not(target_arch = "mips"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]
@ -116,6 +128,8 @@ macro_rules! is_mips_feature_detected {
};
}
/// Prevents compilation if `is_mips64_feature_detected` is used somewhere else
/// than `MIPS64` targets.
#[cfg(not(target_arch = "mips64"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]