fix: Report proc macro errors in expressions correctly as well
They didn't have a krate before, resulting in the generic "proc macro not found" error. Also improve error messages a bit more.
This commit is contained in:
@@ -1159,13 +1159,13 @@ impl DefWithBody {
|
||||
}
|
||||
.into(),
|
||||
),
|
||||
BodyDiagnostic::UnresolvedProcMacro { node } => acc.push(
|
||||
BodyDiagnostic::UnresolvedProcMacro { node, krate } => acc.push(
|
||||
UnresolvedProcMacro {
|
||||
node: node.clone().map(|it| it.into()),
|
||||
precise_location: None,
|
||||
macro_name: None,
|
||||
kind: MacroKind::ProcMacro,
|
||||
krate: None,
|
||||
krate: *krate,
|
||||
}
|
||||
.into(),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user