diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-09 16:07:33 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-09 16:07:33 +0000 |
commit | 99118eeccdf6564876bbe6ec0672b04ffcbe3442 (patch) | |
tree | 08f0fd7d99ad22a3d1db782482b66548e99ba8b2 /crates/hir_ty | |
parent | 42be522c80cf0cc2d49b60f3c1d66afdc51fcbbb (diff) | |
parent | 6e24321e4579d25686982002ed18f321db23cb9f (diff) |
Merge #6784
6784: Introduce anchored_path r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/hir_ty')
-rw-r--r-- | crates/hir_ty/src/test_db.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/hir_ty/src/test_db.rs b/crates/hir_ty/src/test_db.rs index 22254b765..646e16bbe 100644 --- a/crates/hir_ty/src/test_db.rs +++ b/crates/hir_ty/src/test_db.rs | |||
@@ -5,7 +5,9 @@ use std::{ | |||
5 | sync::{Arc, Mutex}, | 5 | sync::{Arc, Mutex}, |
6 | }; | 6 | }; |
7 | 7 | ||
8 | use base_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast}; | 8 | use base_db::{ |
9 | salsa, AnchoredPath, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast, | ||
10 | }; | ||
9 | use hir_def::{db::DefDatabase, ModuleId}; | 11 | use hir_def::{db::DefDatabase, ModuleId}; |
10 | use hir_expand::db::AstDatabase; | 12 | use hir_expand::db::AstDatabase; |
11 | use rustc_hash::{FxHashMap, FxHashSet}; | 13 | use rustc_hash::{FxHashMap, FxHashSet}; |
@@ -67,8 +69,8 @@ impl FileLoader for TestDB { | |||
67 | fn file_text(&self, file_id: FileId) -> Arc<String> { | 69 | fn file_text(&self, file_id: FileId) -> Arc<String> { |
68 | FileLoaderDelegate(self).file_text(file_id) | 70 | FileLoaderDelegate(self).file_text(file_id) |
69 | } | 71 | } |
70 | fn resolve_path(&self, anchor: FileId, path: &str) -> Option<FileId> { | 72 | fn resolve_path(&self, path: AnchoredPath) -> Option<FileId> { |
71 | FileLoaderDelegate(self).resolve_path(anchor, path) | 73 | FileLoaderDelegate(self).resolve_path(path) |
72 | } | 74 | } |
73 | fn relevant_crates(&self, file_id: FileId) -> Arc<FxHashSet<CrateId>> { | 75 | fn relevant_crates(&self, file_id: FileId) -> Arc<FxHashSet<CrateId>> { |
74 | FileLoaderDelegate(self).relevant_crates(file_id) | 76 | FileLoaderDelegate(self).relevant_crates(file_id) |