We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Features::enabled
1 parent 029725f commit 0f0bfc9Copy full SHA for 0f0bfc9
src/librustc_feature/active.rs
@@ -53,6 +53,9 @@ macro_rules! declare_features {
53
$(f(stringify!($feature), self.$feature);)+
54
}
55
56
+ /// Is the given feature enabled?
57
+ ///
58
+ /// Panics if the symbol doesn't correspond to a declared feature.
59
pub fn enabled(&self, feature: Symbol) -> bool {
60
match feature {
61
$( sym::$feature => self.$feature, )*
0 commit comments