diff options
Diffstat (limited to 'crates/ra_hir/src/nameres/raw.rs')
-rw-r--r-- | crates/ra_hir/src/nameres/raw.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs index 04b97cb90..8bf883ac2 100644 --- a/crates/ra_hir/src/nameres/raw.rs +++ b/crates/ra_hir/src/nameres/raw.rs | |||
@@ -345,7 +345,9 @@ impl RawItemsCollector { | |||
345 | 345 | ||
346 | let name = m.name().map(|it| it.as_name()); | 346 | let name = m.name().map(|it| it.as_name()); |
347 | let ast_id = self.source_ast_id_map.ast_id(&m); | 347 | let ast_id = self.source_ast_id_map.ast_id(&m); |
348 | let export = m.has_atom_attr("macro_export"); | 348 | let export = m.has_atom_attr("macro_export") |
349 | || m.attrs().filter_map(|x| x.as_call()).any(|(name, _)| name == "macro_export"); | ||
350 | |||
349 | let m = self.raw_items.macros.alloc(MacroData { ast_id, path, name, export }); | 351 | let m = self.raw_items.macros.alloc(MacroData { ast_id, path, name, export }); |
350 | self.push_item(current_module, RawItem::Macro(m)); | 352 | self.push_item(current_module, RawItem::Macro(m)); |
351 | } | 353 | } |