mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
internal: refactor unresolved extern crate diagnostic
This commit is contained in:
parent
6383252cc2
commit
39f190b72c
5 changed files with 60 additions and 54 deletions
|
@ -484,10 +484,12 @@ impl Module {
|
|||
}
|
||||
DefDiagnosticKind::UnresolvedExternCrate { ast } => {
|
||||
let item = ast.to_node(db.upcast());
|
||||
sink.push(UnresolvedExternCrate {
|
||||
file: ast.file_id,
|
||||
item: AstPtr::new(&item),
|
||||
});
|
||||
acc.push(
|
||||
UnresolvedExternCrate {
|
||||
decl: InFile::new(ast.file_id, AstPtr::new(&item)),
|
||||
}
|
||||
.into(),
|
||||
);
|
||||
}
|
||||
|
||||
DefDiagnosticKind::UnresolvedImport { id, index } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue