mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Include macro path in eager macro resolve error
This commit is contained in:
parent
e6b64fdcdd
commit
af3d6a4b61
1 changed files with 7 additions and 2 deletions
|
@ -204,8 +204,13 @@ fn eager_macro_recur(
|
||||||
|
|
||||||
// Collect replacement
|
// Collect replacement
|
||||||
for child in children {
|
for child in children {
|
||||||
let def = diagnostic_sink
|
let def = diagnostic_sink.option_with(
|
||||||
.option_with(|| macro_resolver(child.path()?), || err("failed to resolve macro"))?;
|
|| macro_resolver(child.path()?),
|
||||||
|
|| {
|
||||||
|
let path = child.path().map(|path| format!(" `{}!`", path)).unwrap_or_default();
|
||||||
|
err(format!("failed to resolve macro{}", path))
|
||||||
|
},
|
||||||
|
)?;
|
||||||
let insert = match def.kind {
|
let insert = match def.kind {
|
||||||
MacroDefKind::BuiltInEager(..) => {
|
MacroDefKind::BuiltInEager(..) => {
|
||||||
let id = expand_eager_macro(
|
let id = expand_eager_macro(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue