Skip to content

Commit 4d5e80c

Browse files
committed
Fix for rebasing
1 parent 1e9a323 commit 4d5e80c

File tree

1 file changed

+14
-3
lines changed
  • crates/ra_hir_expand/src

1 file changed

+14
-3
lines changed

crates/ra_hir_expand/src/db.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,20 @@ pub(crate) fn parse_macro(
172172
// Note:
173173
// The final goal we would like to make all parse_macro success,
174174
// such that the following log will not call anyway.
175-
let loc: MacroCallLoc = db.lookup_intern_macro(macro_call_id);
176-
let node = loc.kind.node(db);
177-
log::warn!("fail on macro_parse: (reason: {} macro_call: {:#})", err, node.value);
175+
match macro_call_id {
176+
MacroCallId::LazyMacro(id) => {
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+
}
178189
})
179190
.ok()?;
180191

0 commit comments

Comments
 (0)