10331: minor: Include macro path in eager macro resolve error r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
bors[bot] 2021-09-24 14:51:19 +00:00 committed by GitHub
commit 2117ba0235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,8 +204,13 @@ fn eager_macro_recur(
// Collect replacement
for child in children {
let def = diagnostic_sink
.option_with(|| macro_resolver(child.path()?), || err("failed to resolve macro"))?;
let def = diagnostic_sink.option_with(
|| 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 {
MacroDefKind::BuiltInEager(..) => {
let id = expand_eager_macro(