mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Use the correct crates proc-macro loading error message
This commit is contained in:
parent
1d34cdcac0
commit
0e41d15b82
6 changed files with 42 additions and 42 deletions
|
@ -627,7 +627,7 @@ fn emit_def_diagnostic(db: &dyn HirDatabase, acc: &mut Vec<AnyDiagnostic>, diag:
|
|||
);
|
||||
}
|
||||
|
||||
DefDiagnosticKind::UnresolvedProcMacro { ast, proc_macro_err } => {
|
||||
DefDiagnosticKind::UnresolvedProcMacro { ast, krate } => {
|
||||
let (node, precise_location, macro_name, kind) = match ast {
|
||||
MacroCallKind::FnLike { ast_id, .. } => {
|
||||
let node = ast_id.to_node(db.upcast());
|
||||
|
@ -690,14 +690,8 @@ fn emit_def_diagnostic(db: &dyn HirDatabase, acc: &mut Vec<AnyDiagnostic>, diag:
|
|||
}
|
||||
};
|
||||
acc.push(
|
||||
UnresolvedProcMacro {
|
||||
node,
|
||||
precise_location,
|
||||
macro_name,
|
||||
kind,
|
||||
proc_macro_err: proc_macro_err.clone(),
|
||||
}
|
||||
.into(),
|
||||
UnresolvedProcMacro { node, precise_location, macro_name, kind, krate: *krate }
|
||||
.into(),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1172,7 +1166,7 @@ impl DefWithBody {
|
|||
precise_location: None,
|
||||
macro_name: None,
|
||||
kind: MacroKind::ProcMacro,
|
||||
proc_macro_err: None,
|
||||
krate: None,
|
||||
}
|
||||
.into(),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue