2
2
//! architecture. These macros provide a better error messages when the user
3
3
//! attempts to call them in a different architecture.
4
4
5
+ /// Prevents compilation if `is_x86_feature_detected` is used somewhere
6
+ /// else than `x86` and `x86_64` targets.
5
7
#[ cfg( not( any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
6
8
#[ macro_export]
7
9
#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
@@ -21,6 +23,8 @@ macro_rules! is_x86_feature_detected {
21
23
} ;
22
24
}
23
25
26
+ /// Prevents compilation if `is_arm_feature_detected` is used somewhere else
27
+ /// than `ARM` targets.
24
28
#[ cfg( not( target_arch = "arm" ) ) ]
25
29
#[ macro_export]
26
30
#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
@@ -40,6 +44,8 @@ macro_rules! is_arm_feature_detected {
40
44
} ;
41
45
}
42
46
47
+ /// Prevents compilation if `is_aarch64_feature_detected` is used somewhere else
48
+ /// than `aarch64` targets.
43
49
#[ cfg( not( target_arch = "aarch64" ) ) ]
44
50
#[ macro_export]
45
51
#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
@@ -59,6 +65,8 @@ macro_rules! is_aarch64_feature_detected {
59
65
} ;
60
66
}
61
67
68
+ /// Prevents compilation if `is_powerpc_feature_detected` is used somewhere else
69
+ /// than `PowerPC` targets.
62
70
#[ cfg( not( target_arch = "powerpc" ) ) ]
63
71
#[ macro_export]
64
72
#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
@@ -78,6 +86,8 @@ guarding it behind a cfg(target_arch) as follows:
78
86
} ;
79
87
}
80
88
89
+ /// Prevents compilation if `is_powerpc64_feature_detected` is used somewhere
90
+ /// else than `PowerPC64` targets.
81
91
#[ cfg( not( target_arch = "powerpc64" ) ) ]
82
92
#[ macro_export]
83
93
#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
@@ -97,6 +107,8 @@ guarding it behind a cfg(target_arch) as follows:
97
107
} ;
98
108
}
99
109
110
+ /// Prevents compilation if `is_mips_feature_detected` is used somewhere else
111
+ /// than `MIPS` targets.
100
112
#[ cfg( not( target_arch = "mips" ) ) ]
101
113
#[ macro_export]
102
114
#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
@@ -116,6 +128,8 @@ macro_rules! is_mips_feature_detected {
116
128
} ;
117
129
}
118
130
131
+ /// Prevents compilation if `is_mips64_feature_detected` is used somewhere else
132
+ /// than `MIPS64` targets.
119
133
#[ cfg( not( target_arch = "mips64" ) ) ]
120
134
#[ macro_export]
121
135
#[ unstable( feature = "stdsimd" , issue = "27731" ) ]
0 commit comments