diff options
Diffstat (limited to 'crates/ra_hir/src/expr.rs')
-rw-r--r-- | crates/ra_hir/src/expr.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs index 480eaf171..a2b5db1a1 100644 --- a/crates/ra_hir/src/expr.rs +++ b/crates/ra_hir/src/expr.rs | |||
@@ -10,7 +10,7 @@ use ra_syntax::{ | |||
10 | }; | 10 | }; |
11 | 11 | ||
12 | use crate::{ | 12 | use crate::{ |
13 | Path, Name, HirDatabase, Resolver,DefWithBody, Either, HirFileId, | 13 | Path, Name, HirDatabase, Resolver,DefWithBody, Either, HirFileId, MacroCallLoc, |
14 | name::AsName, | 14 | name::AsName, |
15 | type_ref::{Mutability, TypeRef}, | 15 | type_ref::{Mutability, TypeRef}, |
16 | }; | 16 | }; |
@@ -828,7 +828,8 @@ where | |||
828 | .ast_id(e) | 828 | .ast_id(e) |
829 | .with_file_id(self.current_file_id); | 829 | .with_file_id(self.current_file_id); |
830 | 830 | ||
831 | if let Some(call_id) = self.resolver.resolve_macro_call(self.db, path, ast_id) { | 831 | if let Some(def) = self.resolver.resolve_macro_call(path) { |
832 | let call_id = MacroCallLoc { def, ast_id }.id(self.db); | ||
832 | if let Some(tt) = self.db.macro_expand(call_id).ok() { | 833 | if let Some(tt) = self.db.macro_expand(call_id).ok() { |
833 | if let Some(expr) = mbe::token_tree_to_expr(&tt).ok() { | 834 | if let Some(expr) = mbe::token_tree_to_expr(&tt).ok() { |
834 | log::debug!("macro expansion {}", expr.syntax().debug_dump()); | 835 | log::debug!("macro expansion {}", expr.syntax().debug_dump()); |