aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand/src/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_expand/src/db.rs')
-rw-r--r--crates/ra_hir_expand/src/db.rs17
1 files changed, 14 insertions, 3 deletions
diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs
index ac8256a84..32e0d5ced 100644
--- a/crates/ra_hir_expand/src/db.rs
+++ b/crates/ra_hir_expand/src/db.rs
@@ -172,9 +172,20 @@ pub(crate) fn parse_macro(
172 // Note: 172 // Note:
173 // The final goal we would like to make all parse_macro success, 173 // The final goal we would like to make all parse_macro success,
174 // such that the following log will not call anyway. 174 // such that the following log will not call anyway.
175 let loc: MacroCallLoc = db.lookup_intern_macro(macro_call_id); 175 match macro_call_id {
176 let node = loc.kind.node(db); 176 MacroCallId::LazyMacro(id) => {
177 log::warn!("fail on macro_parse: (reason: {} macro_call: {:#})", err, node.value); 177 let loc: MacroCallLoc = db.lookup_intern_macro(id);
178 let node = loc.kind.node(db);
179 log::warn!(
180 "fail on macro_parse: (reason: {} macro_call: {:#})",
181 err,
182 node.value
183 );
184 }
185 _ => {
186 log::warn!("fail on macro_parse: (reason: {})", err);
187 }
188 }
178 }) 189 })
179 .ok()?; 190 .ok()?;
180 191