aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/test_db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/test_db.rs')
-rw-r--r--crates/hir_def/src/test_db.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/hir_def/src/test_db.rs b/crates/hir_def/src/test_db.rs
index 6c357c915..a9c1e13e2 100644
--- a/crates/hir_def/src/test_db.rs
+++ b/crates/hir_def/src/test_db.rs
@@ -278,9 +278,11 @@ impl TestDB {
278 let node = ast.to_node(self.upcast()); 278 let node = ast.to_node(self.upcast());
279 (InFile::new(ast.file_id, node.syntax().clone()), "UnresolvedExternCrate") 279 (InFile::new(ast.file_id, node.syntax().clone()), "UnresolvedExternCrate")
280 } 280 }
281 DefDiagnosticKind::UnresolvedImport { ast, .. } => { 281 DefDiagnosticKind::UnresolvedImport { id, .. } => {
282 let node = ast.to_node(self.upcast()); 282 let item_tree = id.item_tree(self.upcast());
283 (InFile::new(ast.file_id, node.syntax().clone()), "UnresolvedImport") 283 let import = &item_tree[id.value];
284 let node = InFile::new(id.file_id(), import.ast_id).to_node(self.upcast());
285 (InFile::new(id.file_id(), node.syntax().clone()), "UnresolvedImport")
284 } 286 }
285 DefDiagnosticKind::UnconfiguredCode { ast, .. } => { 287 DefDiagnosticKind::UnconfiguredCode { ast, .. } => {
286 let node = ast.to_node(self.upcast()); 288 let node = ast.to_node(self.upcast());