From 8c639a87bdbd08b10d4eb84d00f25ba7bcd56be0 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sat, 29 May 2021 20:32:57 +0200 Subject: Thread proc-macro types through the HIR --- crates/hir_expand/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/hir_expand/src/lib.rs') diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs index 10d37234e..90d8ae240 100644 --- a/crates/hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs @@ -15,6 +15,7 @@ pub mod quote; pub mod eager; mod input; +use base_db::ProcMacroKind; use either::Either; pub use mbe::{ExpandError, ExpandResult}; @@ -207,7 +208,7 @@ impl MacroDefId { MacroDefKind::BuiltIn(_, id) => id, MacroDefKind::BuiltInDerive(_, id) => id, MacroDefKind::BuiltInEager(_, id) => id, - MacroDefKind::ProcMacro(_, id) => return Either::Right(*id), + MacroDefKind::ProcMacro(.., id) => return Either::Right(*id), }; Either::Left(*id) } @@ -224,7 +225,7 @@ pub enum MacroDefKind { // FIXME: maybe just Builtin and rename BuiltinFnLikeExpander to BuiltinExpander BuiltInDerive(BuiltinDeriveExpander, AstId), BuiltInEager(EagerExpander, AstId), - ProcMacro(ProcMacroExpander, AstId), + ProcMacro(ProcMacroExpander, ProcMacroKind, AstId), } #[derive(Debug, Clone, PartialEq, Eq, Hash)] -- cgit v1.2.3