22//! architecture. These macros provide a better error messages when the user
33//! attempts to call them in a different architecture.
44
5+ /// Prevents compilation if `is_x86_feature_detected` is used somewhere
6+ /// else than `x86` and `x86_64` targets.
57#[ cfg( not( any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
68#[ macro_export]
79#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
@@ -21,6 +23,8 @@ macro_rules! is_x86_feature_detected {
2123 } ;
2224}
2325
26+ /// Prevents compilation if `is_arm_feature_detected` is used somewhere else
27+ /// than `ARM` targets.
2428#[ cfg( not( target_arch = "arm" ) ) ]
2529#[ macro_export]
2630#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
@@ -40,6 +44,8 @@ macro_rules! is_arm_feature_detected {
4044 } ;
4145}
4246
47+ /// Prevents compilation if `is_aarch64_feature_detected` is used somewhere else
48+ /// than `aarch64` targets.
4349#[ cfg( not( target_arch = "aarch64" ) ) ]
4450#[ macro_export]
4551#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
@@ -59,6 +65,8 @@ macro_rules! is_aarch64_feature_detected {
5965 } ;
6066}
6167
68+ /// Prevents compilation if `is_powerpc_feature_detected` is used somewhere else
69+ /// than `PowerPC` targets.
6270#[ cfg( not( target_arch = "powerpc" ) ) ]
6371#[ macro_export]
6472#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
@@ -78,6 +86,8 @@ guarding it behind a cfg(target_arch) as follows:
7886 } ;
7987}
8088
89+ /// Prevents compilation if `is_powerpc64_feature_detected` is used somewhere
90+ /// else than `PowerPC64` targets.
8191#[ cfg( not( target_arch = "powerpc64" ) ) ]
8292#[ macro_export]
8393#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
@@ -97,6 +107,8 @@ guarding it behind a cfg(target_arch) as follows:
97107 } ;
98108}
99109
110+ /// Prevents compilation if `is_mips_feature_detected` is used somewhere else
111+ /// than `MIPS` targets.
100112#[ cfg( not( target_arch = "mips" ) ) ]
101113#[ macro_export]
102114#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
@@ -116,6 +128,8 @@ macro_rules! is_mips_feature_detected {
116128 } ;
117129}
118130
131+ /// Prevents compilation if `is_mips64_feature_detected` is used somewhere else
132+ /// than `MIPS64` targets.
119133#[ cfg( not( target_arch = "mips64" ) ) ]
120134#[ macro_export]
121135#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
0 commit comments