aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_expand/src/lib.rs')
-rw-r--r--crates/hir_expand/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs
index 618f26b95..623791b58 100644
--- a/crates/hir_expand/src/lib.rs
+++ b/crates/hir_expand/src/lib.rs
@@ -8,6 +8,7 @@ pub mod db;
8pub mod ast_id_map; 8pub mod ast_id_map;
9pub mod name; 9pub mod name;
10pub mod hygiene; 10pub mod hygiene;
11pub mod builtin_attr;
11pub mod builtin_derive; 12pub mod builtin_derive;
12pub mod builtin_macro; 13pub mod builtin_macro;
13pub mod proc_macro; 14pub mod proc_macro;
@@ -32,6 +33,7 @@ use syntax::{
32}; 33};
33 34
34use crate::ast_id_map::FileAstId; 35use crate::ast_id_map::FileAstId;
36use crate::builtin_attr::BuiltinAttrExpander;
35use crate::builtin_derive::BuiltinDeriveExpander; 37use crate::builtin_derive::BuiltinDeriveExpander;
36use crate::builtin_macro::{BuiltinFnLikeExpander, EagerExpander}; 38use crate::builtin_macro::{BuiltinFnLikeExpander, EagerExpander};
37use crate::proc_macro::ProcMacroExpander; 39use crate::proc_macro::ProcMacroExpander;
@@ -206,6 +208,7 @@ impl MacroDefId {
206 let id = match &self.kind { 208 let id = match &self.kind {
207 MacroDefKind::Declarative(id) => id, 209 MacroDefKind::Declarative(id) => id,
208 MacroDefKind::BuiltIn(_, id) => id, 210 MacroDefKind::BuiltIn(_, id) => id,
211 MacroDefKind::BuiltInAttr(_, id) => id,
209 MacroDefKind::BuiltInDerive(_, id) => id, 212 MacroDefKind::BuiltInDerive(_, id) => id,
210 MacroDefKind::BuiltInEager(_, id) => id, 213 MacroDefKind::BuiltInEager(_, id) => id,
211 MacroDefKind::ProcMacro(.., id) => return Either::Right(*id), 214 MacroDefKind::ProcMacro(.., id) => return Either::Right(*id),
@@ -223,6 +226,7 @@ pub enum MacroDefKind {
223 Declarative(AstId<ast::Macro>), 226 Declarative(AstId<ast::Macro>),
224 BuiltIn(BuiltinFnLikeExpander, AstId<ast::Macro>), 227 BuiltIn(BuiltinFnLikeExpander, AstId<ast::Macro>),
225 // FIXME: maybe just Builtin and rename BuiltinFnLikeExpander to BuiltinExpander 228 // FIXME: maybe just Builtin and rename BuiltinFnLikeExpander to BuiltinExpander
229 BuiltInAttr(BuiltinAttrExpander, AstId<ast::Macro>),
226 BuiltInDerive(BuiltinDeriveExpander, AstId<ast::Macro>), 230 BuiltInDerive(BuiltinDeriveExpander, AstId<ast::Macro>),
227 BuiltInEager(EagerExpander, AstId<ast::Macro>), 231 BuiltInEager(EagerExpander, AstId<ast::Macro>),
228 ProcMacro(ProcMacroExpander, ProcMacroKind, AstId<ast::Fn>), 232 ProcMacro(ProcMacroExpander, ProcMacroKind, AstId<ast::Fn>),