From 447268ceac497432822e8cf28525a6784f392020 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Wed, 27 Nov 2019 01:33:08 +0800 Subject: Hide MacroCallLoc --- crates/ra_hir/src/source_binder.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 82cb66583..7c4ebd4b4 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs @@ -14,8 +14,7 @@ use hir_def::{ DefWithBodyId, }; use hir_expand::{ - hygiene::Hygiene, name::AsName, AstId, HirFileId, MacroCallId, MacroCallLoc, MacroFileKind, - Source, + hygiene::Hygiene, name::AsName, AstId, HirFileId, MacroCallId, MacroFileKind, Source, }; use ra_syntax::{ ast::{self, AstNode}, @@ -451,9 +450,8 @@ impl SourceAnalyzer { macro_call.file_id, db.ast_id_map(macro_call.file_id).ast_id(macro_call.value), ); - let macro_call_loc = MacroCallLoc { def, ast_id }; Some(Expansion { - macro_call_id: db.intern_macro(macro_call_loc), + macro_call_id: def.as_call_id(db, ast_id), macro_file_kind: to_macro_file_kind(macro_call.value), }) } -- cgit v1.2.3