From 39f190b72ccab9a166529f6ae1c8d5d562b15571 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 13 Jun 2021 16:05:43 +0300 Subject: internal: refactor unresolved extern crate diagnostic --- crates/hir/src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'crates/hir/src/lib.rs') diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 373134f62..f7883c469 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -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 } => { -- cgit v1.2.3