aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r--crates/ra_hir/src/nameres/collector.rs5
-rw-r--r--crates/ra_hir/src/nameres/raw.rs4
2 files changed, 2 insertions, 7 deletions
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs
index f0e790e4c..1d79cbd8c 100644
--- a/crates/ra_hir/src/nameres/collector.rs
+++ b/crates/ra_hir/src/nameres/collector.rs
@@ -716,10 +716,7 @@ where
716 } 716 }
717 717
718 fn is_cfg_enabled(&self, attrs: &[Attr]) -> bool { 718 fn is_cfg_enabled(&self, attrs: &[Attr]) -> bool {
719 attrs 719 attrs.iter().all(|attr| attr.is_cfg_enabled(&self.def_collector.cfg_options) != Some(false))
720 .iter()
721 .flat_map(|attr| attr.as_cfg())
722 .all(|cfg| self.def_collector.cfg_options.is_cfg_enabled(cfg).unwrap_or(true))
723 } 720 }
724} 721}
725 722
diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs
index ff079bcf1..f02d4eb7a 100644
--- a/crates/ra_hir/src/nameres/raw.rs
+++ b/crates/ra_hir/src/nameres/raw.rs
@@ -411,9 +411,7 @@ impl<DB: AstDatabase> RawItemsCollector<&DB> {
411 } 411 }
412 412
413 fn parse_attrs(&self, item: &impl ast::AttrsOwner) -> Arc<[Attr]> { 413 fn parse_attrs(&self, item: &impl ast::AttrsOwner) -> Arc<[Attr]> {
414 item.attrs() 414 Attr::from_attrs_owner(self.file_id, item, self.db)
415 .flat_map(|ast| Attr::from_src(Source { ast, file_id: self.file_id }, self.db))
416 .collect()
417 } 415 }
418} 416}
419 417