diff options
author | JasperDeSutter <[email protected]> | 2019-09-12 13:41:16 +0100 |
---|---|---|
committer | JasperDeSutter <[email protected]> | 2019-09-12 13:41:16 +0100 |
commit | e6ee324b8529df86f330f5240cbb7bb9048fff57 (patch) | |
tree | 0e41c01279e70133587860f37afee8f47d435433 /crates/ra_hir/src/nameres/raw.rs | |
parent | a1261631a89f7169a3f84dec33aff61758c601e3 (diff) |
add macros with local_inner_macros argument
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 | } |