about summary refs log tree commit diff
path: root/library/stdarch/crates/std_detect/src/detect/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/stdarch/crates/std_detect/src/detect/macros.rs')
-rw-r--r--library/stdarch/crates/std_detect/src/detect/macros.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/macros.rs b/library/stdarch/crates/std_detect/src/detect/macros.rs
index 2607e07bf37..a4af3d1c027 100644
--- a/library/stdarch/crates/std_detect/src/detect/macros.rs
+++ b/library/stdarch/crates/std_detect/src/detect/macros.rs
@@ -14,7 +14,8 @@ macro_rules! features {
         macro_rules! $macro_name {
             $(
                 ($feature_lit) => {
-                    $crate::detect::__is_feature_detected::$feature()
+                    cfg!(target_feature = $feature_lit) ||
+                        $crate::detect::__is_feature_detected::$feature()
                 };
             )*
             $(
@@ -94,8 +95,7 @@ macro_rules! features {
                 #[doc(hidden)]
                 #[$stability_attr]
                 pub fn $feature() -> bool {
-                    cfg!(target_feature = $feature_lit) ||
-                        $crate::detect::check_for($crate::detect::Feature::$feature)
+                    $crate::detect::check_for($crate::detect::Feature::$feature)
                 }
             )*
         }