aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-11 16:18:42 +0100
committerAleksey Kladov <[email protected]>2020-04-11 16:18:42 +0100
commit55356332bfd22db159fef044b9e611b5b82b417c (patch)
treec1e8ca49fb70d9cd64bd95a7b5b3a68bae484d1a /crates/ra_hir_def/src/nameres
parentb8eb1597c9a950a31b06d5625f2793d5237d756c (diff)
Remove code duplication
Diffstat (limited to 'crates/ra_hir_def/src/nameres')
-rw-r--r--crates/ra_hir_def/src/nameres/collector.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs
index 8fe3f8617..1c33a6520 100644
--- a/crates/ra_hir_def/src/nameres/collector.rs
+++ b/crates/ra_hir_def/src/nameres/collector.rs
@@ -977,11 +977,7 @@ impl ModCollector<'_, '_> {
977 } 977 }
978 978
979 fn is_cfg_enabled(&self, attrs: &Attrs) -> bool { 979 fn is_cfg_enabled(&self, attrs: &Attrs) -> bool {
980 // FIXME: handle cfg_attr :-) 980 attrs.is_cfg_enabled(self.def_collector.cfg_options)
981 attrs
982 .by_key("cfg")
983 .tt_values()
984 .all(|tt| self.def_collector.cfg_options.is_cfg_enabled(tt) != Some(false))
985 } 981 }
986} 982}
987 983