1
Fork 0

Document Features::enabled

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
This commit is contained in:
ecstatic-morse 2019-12-12 11:10:21 -08:00 committed by Dylan MacKenzie
parent 029725f139
commit 0f0bfc9c22

View file

@ -53,6 +53,9 @@ macro_rules! declare_features {
$(f(stringify!($feature), self.$feature);)+
}
/// Is the given feature enabled?
///
/// Panics if the symbol doesn't correspond to a declared feature.
pub fn enabled(&self, feature: Symbol) -> bool {
match feature {
$( sym::$feature => self.$feature, )*