aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-06-25 13:39:27 +0100
committerJonas Schievink <[email protected]>2020-06-25 13:39:27 +0100
commitd84b3ff6a1c42df0e349dc8ec3fc08e8c1251777 (patch)
treec39b8534ceaaeb34ec99c973afa738f6f44dd6a4 /crates/ra_hir_def/src/nameres
parent9ba772657950cb8353f37bc2576b78c4f0c8996f (diff)
Collect field/variant attrs in ItemTree
Diffstat (limited to 'crates/ra_hir_def/src/nameres')
-rw-r--r--crates/ra_hir_def/src/nameres/collector.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs
index 94da700ad..2ced4f66b 100644
--- a/crates/ra_hir_def/src/nameres/collector.rs
+++ b/crates/ra_hir_def/src/nameres/collector.rs
@@ -742,7 +742,7 @@ impl ModCollector<'_, '_> {
742 // `#[macro_use] extern crate` is hoisted to imports macros before collecting 742 // `#[macro_use] extern crate` is hoisted to imports macros before collecting
743 // any other items. 743 // any other items.
744 for item in items { 744 for item in items {
745 if self.is_cfg_enabled(self.item_tree.attrs(*item)) { 745 if self.is_cfg_enabled(self.item_tree.attrs((*item).into())) {
746 if let ModItem::ExternCrate(id) = item { 746 if let ModItem::ExternCrate(id) = item {
747 let import = self.item_tree[*id].clone(); 747 let import = self.item_tree[*id].clone();
748 if import.is_macro_use { 748 if import.is_macro_use {
@@ -753,7 +753,7 @@ impl ModCollector<'_, '_> {
753 } 753 }
754 754
755 for &item in items { 755 for &item in items {
756 let attrs = self.item_tree.attrs(item); 756 let attrs = self.item_tree.attrs(item.into());
757 if self.is_cfg_enabled(attrs) { 757 if self.is_cfg_enabled(attrs) {
758 let module = 758 let module =
759 ModuleId { krate: self.def_collector.def_map.krate, local_id: self.module_id }; 759 ModuleId { krate: self.def_collector.def_map.krate, local_id: self.module_id };