From 22f064cca7651eaf2980fcfa27618d99c633a589 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Tue, 10 Mar 2020 22:00:31 +0800 Subject: Add resolve_extern_path in DB --- crates/ra_hir_def/src/test_db.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir_def/src') diff --git a/crates/ra_hir_def/src/test_db.rs b/crates/ra_hir_def/src/test_db.rs index 1568820e9..0756916a8 100644 --- a/crates/ra_hir_def/src/test_db.rs +++ b/crates/ra_hir_def/src/test_db.rs @@ -6,7 +6,7 @@ use std::{ }; use crate::db::DefDatabase; -use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath}; +use ra_db::{salsa, CrateId, ExternSourceId, FileId, FileLoader, FileLoaderDelegate, RelativePath}; #[salsa::database( ra_db::SourceDatabaseExtStorage, @@ -52,6 +52,14 @@ impl FileLoader for TestDB { fn relevant_crates(&self, file_id: FileId) -> Arc> { FileLoaderDelegate(self).relevant_crates(file_id) } + + fn resolve_extern_path( + &self, + extern_id: ExternSourceId, + relative_path: &RelativePath, + ) -> Option { + FileLoaderDelegate(self).resolve_extern_path(extern_id, relative_path) + } } impl TestDB { -- cgit v1.2.3