diff options
| author | ecstatic-morse <ecstaticmorse@gmail.com> | 2019-12-12 11:10:21 -0800 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2019-12-13 10:48:55 -0800 |
| commit | 0f0bfc9c2253c44fb826b057e4356bb50e9c704f (patch) | |
| tree | 1dee1ce1f68ef244cb6ad0d475a67913fa9196b7 | |
| parent | 029725f139c581e4484460d90d23909d7d4bebc1 (diff) | |
| download | rust-0f0bfc9c2253c44fb826b057e4356bb50e9c704f.tar.gz rust-0f0bfc9c2253c44fb826b057e4356bb50e9c704f.zip | |
Document `Features::enabled`
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
| -rw-r--r-- | src/librustc_feature/active.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_feature/active.rs b/src/librustc_feature/active.rs index 20357e5581a..08b65aff7c9 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, )* |
