aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres/raw.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/nameres/raw.rs')
-rw-r--r--crates/ra_hir_def/src/nameres/raw.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/nameres/raw.rs b/crates/ra_hir_def/src/nameres/raw.rs
index 1631e87b8..8f190e7f9 100644
--- a/crates/ra_hir_def/src/nameres/raw.rs
+++ b/crates/ra_hir_def/src/nameres/raw.rs
@@ -209,11 +209,8 @@ impl RawItemsCollector {
209 current_module: Option<Idx<ModuleData>>, 209 current_module: Option<Idx<ModuleData>>,
210 body: impl ast::ModuleItemOwner, 210 body: impl ast::ModuleItemOwner,
211 ) { 211 ) {
212 for item_or_macro in body.items_with_macros() { 212 for item in body.items() {
213 match item_or_macro { 213 self.add_item(current_module, item)
214 ast::ItemOrMacro::Macro(m) => self.add_macro(current_module, m),
215 ast::ItemOrMacro::Item(item) => self.add_item(current_module, item),
216 }
217 } 214 }
218 } 215 }
219 216
@@ -265,6 +262,10 @@ impl RawItemsCollector {
265 ast::ModuleItem::StaticDef(it) => { 262 ast::ModuleItem::StaticDef(it) => {
266 (DefKind::Static(self.source_ast_id_map.ast_id(&it)), it.name()) 263 (DefKind::Static(self.source_ast_id_map.ast_id(&it)), it.name())
267 } 264 }
265 ast::ModuleItem::MacroCall(it) => {
266 self.add_macro(current_module, it);
267 return;
268 }
268 }; 269 };
269 if let Some(name) = name { 270 if let Some(name) = name {
270 let name = name.as_name(); 271 let name = name.as_name();