We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f0cfe9 commit 594e63bCopy full SHA for 594e63b
crates/std_detect/src/detect/macros.rs
@@ -14,7 +14,8 @@ macro_rules! features {
14
macro_rules! $macro_name {
15
$(
16
($feature_lit) => {
17
- $crate::detect::__is_feature_detected::$feature()
+ cfg!(target_feature = $feature_lit) ||
18
+ $crate::detect::__is_feature_detected::$feature()
19
};
20
)*
21
@@ -94,8 +95,7 @@ macro_rules! features {
94
95
#[doc(hidden)]
96
#[$stability_attr]
97
pub fn $feature() -> bool {
- cfg!(target_feature = $feature_lit) ||
98
- $crate::detect::check_for($crate::detect::Feature::$feature)
+ $crate::detect::check_for($crate::detect::Feature::$feature)
99
}
100
101
0 commit comments