aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand/src/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_expand/src/db.rs')
-rw-r--r--crates/hir_expand/src/db.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs
index e8f4af309..3ebe194e4 100644
--- a/crates/hir_expand/src/db.rs
+++ b/crates/hir_expand/src/db.rs
@@ -13,8 +13,8 @@ use syntax::{
13 13
14use crate::{ 14use crate::{
15 ast_id_map::AstIdMap, hygiene::HygieneFrame, input::process_macro_input, BuiltinDeriveExpander, 15 ast_id_map::AstIdMap, hygiene::HygieneFrame, input::process_macro_input, BuiltinDeriveExpander,
16 BuiltinFnLikeExpander, HirFileId, HirFileIdRepr, MacroCallId, MacroCallLoc, MacroDefId, 16 BuiltinFnLikeExpander, HirFileId, HirFileIdRepr, MacroCallId, MacroCallKind, MacroCallLoc,
17 MacroDefKind, MacroFile, ProcMacroExpander, 17 MacroDefId, MacroDefKind, MacroFile, ProcMacroExpander,
18}; 18};
19 19
20/// Total limit on the number of tokens produced by any macro invocation. 20/// Total limit on the number of tokens produced by any macro invocation.
@@ -377,7 +377,12 @@ fn expand_proc_macro(
377 _ => unreachable!(), 377 _ => unreachable!(),
378 }; 378 };
379 379
380 expander.expand(db, loc.krate, &macro_arg.0) 380 let attr_arg = match &loc.kind {
381 MacroCallKind::Attr { attr_args, .. } => Some(attr_args),
382 _ => None,
383 };
384
385 expander.expand(db, loc.krate, &macro_arg.0, attr_arg)
381} 386}
382 387
383fn is_self_replicating(from: &SyntaxNode, to: &SyntaxNode) -> bool { 388fn is_self_replicating(from: &SyntaxNode, to: &SyntaxNode) -> bool {