From 9eb14e11706ebf9a60b0afbe9bc82a99a816bc02 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 10 Sep 2019 22:12:37 +0300 Subject: cleanup expansion to item list --- crates/ra_hir/src/nameres/raw.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir/src/nameres/raw.rs') diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs index c646d3d00..04b97cb90 100644 --- a/crates/ra_hir/src/nameres/raw.rs +++ b/crates/ra_hir/src/nameres/raw.rs @@ -76,8 +76,10 @@ impl RawItems { source_map: ImportSourceMap::default(), }; if let Some(node) = db.parse_or_expand(file_id) { - if let Some(source_file) = ast::SourceFile::cast(node) { + if let Some(source_file) = ast::SourceFile::cast(node.clone()) { collector.process_module(None, source_file); + } else if let Some(item_list) = ast::MacroItems::cast(node) { + collector.process_module(None, item_list); } } (Arc::new(collector.raw_items), Arc::new(collector.source_map)) -- cgit v1.2.3