diff options
author | Aleksey Kladov <[email protected]> | 2020-07-23 15:22:17 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-23 15:53:12 +0100 |
commit | 38e38d9b290ff90973c25a06962b81dbbb5d3d9e (patch) | |
tree | 53bd0741216f4db6b8ab8a16b8dccaf2855f5ab9 /crates/ra_cfg/src/lib.rs | |
parent | 0cf8ee2dc22569fac2115c41b85d5df23af3ce5a (diff) |
Cleanup CFG API
Diffstat (limited to 'crates/ra_cfg/src/lib.rs')
-rw-r--r-- | crates/ra_cfg/src/lib.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ra_cfg/src/lib.rs b/crates/ra_cfg/src/lib.rs index cd097f2a0..cd5a0a7b6 100644 --- a/crates/ra_cfg/src/lib.rs +++ b/crates/ra_cfg/src/lib.rs | |||
@@ -5,7 +5,7 @@ mod cfg_expr; | |||
5 | use ra_syntax::SmolStr; | 5 | use ra_syntax::SmolStr; |
6 | use rustc_hash::FxHashSet; | 6 | use rustc_hash::FxHashSet; |
7 | 7 | ||
8 | pub use cfg_expr::{parse_cfg, CfgExpr}; | 8 | pub use cfg_expr::CfgExpr; |
9 | 9 | ||
10 | /// Configuration options used for conditional compilition on items with `cfg` attributes. | 10 | /// Configuration options used for conditional compilition on items with `cfg` attributes. |
11 | /// We have two kind of options in different namespaces: atomic options like `unix`, and | 11 | /// We have two kind of options in different namespaces: atomic options like `unix`, and |
@@ -31,10 +31,6 @@ impl CfgOptions { | |||
31 | }) | 31 | }) |
32 | } | 32 | } |
33 | 33 | ||
34 | pub fn is_cfg_enabled(&self, attr: &tt::Subtree) -> Option<bool> { | ||
35 | self.check(&parse_cfg(attr)) | ||
36 | } | ||
37 | |||
38 | pub fn insert_atom(&mut self, key: SmolStr) { | 34 | pub fn insert_atom(&mut self, key: SmolStr) { |
39 | self.atoms.insert(key); | 35 | self.atoms.insert(key); |
40 | } | 36 | } |