Skip to content

Commit 5928048

Browse files
committed
Implement a fallback for the No-op Feature
1 parent 16f7077 commit 5928048

File tree

1 file changed

+7
-0
lines changed
  • crates/std_detect/src/detect

1 file changed

+7
-0
lines changed

crates/std_detect/src/detect/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ cfg_if! {
6161
}
6262
#[doc(hidden)]
6363
pub mod __is_feature_detected {}
64+
65+
impl Feature {
66+
#[doc(hidden)]
67+
pub fn from_str(_s: &str) -> Result<Feature, ()> { Err(()) }
68+
#[doc(hidden)]
69+
pub fn to_str(self) -> &'static str { "" }
70+
}
6471
}
6572
}
6673
}

0 commit comments

Comments
 (0)