Skip to content

Commit 594e63b

Browse files
authored
Move cfg!(target_feature) directly into is_*_feature_detected!() (rust-lang#1141)
Fixes rust-lang#1135
1 parent 2f0cfe9 commit 594e63b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/std_detect/src/detect/macros.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ macro_rules! features {
1414
macro_rules! $macro_name {
1515
$(
1616
($feature_lit) => {
17-
$crate::detect::__is_feature_detected::$feature()
17+
cfg!(target_feature = $feature_lit) ||
18+
$crate::detect::__is_feature_detected::$feature()
1819
};
1920
)*
2021
$(
@@ -94,8 +95,7 @@ macro_rules! features {
9495
#[doc(hidden)]
9596
#[$stability_attr]
9697
pub fn $feature() -> bool {
97-
cfg!(target_feature = $feature_lit) ||
98-
$crate::detect::check_for($crate::detect::Feature::$feature)
98+
$crate::detect::check_for($crate::detect::Feature::$feature)
9999
}
100100
)*
101101
}

0 commit comments

Comments
 (0)