diff options
author | Seivan Heidari <[email protected]> | 2019-11-11 13:31:09 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-11-11 13:31:09 +0000 |
commit | 68a5ff050faf514e9d122212a66703ca8ce66ab7 (patch) | |
tree | 0c389d2680aae82c1805a52f8315312724134341 /crates/ra_hir_def/src/nameres/raw.rs | |
parent | 7cd075ff0beb97039cd1d1c6c021abf89339731b (diff) | |
parent | a599147b4232c0d4f6b071a3a96e86f903f4cf52 (diff) |
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
Diffstat (limited to 'crates/ra_hir_def/src/nameres/raw.rs')
-rw-r--r-- | crates/ra_hir_def/src/nameres/raw.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_hir_def/src/nameres/raw.rs b/crates/ra_hir_def/src/nameres/raw.rs index 369376f30..f52002bc0 100644 --- a/crates/ra_hir_def/src/nameres/raw.rs +++ b/crates/ra_hir_def/src/nameres/raw.rs | |||
@@ -200,6 +200,7 @@ pub(super) struct MacroData { | |||
200 | pub(super) path: Path, | 200 | pub(super) path: Path, |
201 | pub(super) name: Option<Name>, | 201 | pub(super) name: Option<Name>, |
202 | pub(super) export: bool, | 202 | pub(super) export: bool, |
203 | pub(super) builtin: bool, | ||
203 | } | 204 | } |
204 | 205 | ||
205 | struct RawItemsCollector { | 206 | struct RawItemsCollector { |
@@ -367,7 +368,11 @@ impl RawItemsCollector { | |||
367 | // FIXME: cfg_attr | 368 | // FIXME: cfg_attr |
368 | let export = m.attrs().filter_map(|x| x.simple_name()).any(|name| name == "macro_export"); | 369 | let export = m.attrs().filter_map(|x| x.simple_name()).any(|name| name == "macro_export"); |
369 | 370 | ||
370 | let m = self.raw_items.macros.alloc(MacroData { ast_id, path, name, export }); | 371 | // FIXME: cfg_attr |
372 | let builtin = | ||
373 | m.attrs().filter_map(|x| x.simple_name()).any(|name| name == "rustc_builtin_macro"); | ||
374 | |||
375 | let m = self.raw_items.macros.alloc(MacroData { ast_id, path, name, export, builtin }); | ||
371 | self.push_item(current_module, attrs, RawItemKind::Macro(m)); | 376 | self.push_item(current_module, attrs, RawItemKind::Macro(m)); |
372 | } | 377 | } |
373 | 378 | ||