diff options
| author | inquisitivecrystal <22333129+inquisitivecrystal@users.noreply.github.com> | 2021-07-30 23:50:57 -0700 |
|---|---|---|
| committer | inquisitivecrystal <22333129+inquisitivecrystal@users.noreply.github.com> | 2021-08-28 00:16:34 -0700 |
| commit | 8c62fa057527fc07afabb201bb31428409ef4d8a (patch) | |
| tree | b406fd584e223518dc4588c93d7b814a1bbe8489 /compiler/rustc_save_analysis/src | |
| parent | ac50a53359328a5d7f2f558833e63d59d372e4f7 (diff) | |
| download | rust-8c62fa057527fc07afabb201bb31428409ef4d8a.tar.gz rust-8c62fa057527fc07afabb201bb31428409ef4d8a.zip | |
Treat macros as HIR items
Diffstat (limited to 'compiler/rustc_save_analysis/src')
| -rw-r--r-- | compiler/rustc_save_analysis/src/sig.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_save_analysis/src/sig.rs b/compiler/rustc_save_analysis/src/sig.rs index c3bc1c191ff..7864b47ab0a 100644 --- a/compiler/rustc_save_analysis/src/sig.rs +++ b/compiler/rustc_save_analysis/src/sig.rs @@ -416,6 +416,14 @@ impl<'hir> Sig for hir::Item<'hir> { Ok(sig) } + hir::ItemKind::Macro(_) => { + let mut text = "macro".to_owned(); + let name = self.ident.to_string(); + text.push_str(&name); + text.push_str(&"! {}"); + + Ok(text_sig(text)) + } hir::ItemKind::Mod(ref _mod) => { let mut text = "mod ".to_owned(); let name = self.ident.to_string(); |
