From 0f0bfc9c2253c44fb826b057e4356bb50e9c704f Mon Sep 17 00:00:00 2001 From: ecstatic-morse Date: Thu, 12 Dec 2019 11:10:21 -0800 Subject: [PATCH] Document `Features::enabled` Co-Authored-By: Mazdak Farrokhzad --- src/librustc_feature/active.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/librustc_feature/active.rs b/src/librustc_feature/active.rs index 20357e5581ab..08b65aff7c93 100644 --- a/src/librustc_feature/active.rs +++ b/src/librustc_feature/active.rs @@ -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, )*