aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/source_binder.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-12-05 14:10:33 +0000
committerFlorian Diebold <[email protected]>2019-12-05 16:23:09 +0000
commit18f6a995d0fc1f45099f3cc810a5d55d5401b41b (patch)
tree808cb0f025b488f59935007802d1bb85f1cf0044 /crates/ra_hir/src/source_binder.rs
parent4c0bd068da39e74c66104206e27c270454e3562e (diff)
Add expansion infrastructure for derive macros
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r--crates/ra_hir/src/source_binder.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index db0451059..42c392513 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -20,7 +20,8 @@ use hir_def::{
20 AssocItemId, DefWithBodyId, 20 AssocItemId, DefWithBodyId,
21}; 21};
22use hir_expand::{ 22use hir_expand::{
23 hygiene::Hygiene, name::AsName, AstId, HirFileId, InFile, MacroCallId, MacroFileKind, 23 hygiene::Hygiene, name::AsName, AstId, HirFileId, InFile, MacroCallId, MacroCallKind,
24 MacroFileKind,
24}; 25};
25use ra_syntax::{ 26use ra_syntax::{
26 ast::{self, AstNode}, 27 ast::{self, AstNode},
@@ -456,7 +457,7 @@ impl SourceAnalyzer {
456 db.ast_id_map(macro_call.file_id).ast_id(macro_call.value), 457 db.ast_id_map(macro_call.file_id).ast_id(macro_call.value),
457 ); 458 );
458 Some(Expansion { 459 Some(Expansion {
459 macro_call_id: def.as_call_id(db, ast_id), 460 macro_call_id: def.as_call_id(db, MacroCallKind::FnLike(ast_id)),
460 macro_file_kind: to_macro_file_kind(macro_call.value), 461 macro_file_kind: to_macro_file_kind(macro_call.value),
461 }) 462 })
462 } 463 }