aboutsummaryrefslogtreecommitdiff
path: root/crates/base_db
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-12-09 15:41:35 +0000
committerAleksey Kladov <[email protected]>2020-12-09 15:42:07 +0000
commit5e3891c2559de5a6540d69bc14ded281484479f9 (patch)
treed0f1fb876c99dea1bbd709a9dda006a7941f1eee /crates/base_db
parent42be522c80cf0cc2d49b60f3c1d66afdc51fcbbb (diff)
.
Diffstat (limited to 'crates/base_db')
-rw-r--r--crates/base_db/src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/base_db/src/lib.rs b/crates/base_db/src/lib.rs
index 5571af495..a2cc1e099 100644
--- a/crates/base_db/src/lib.rs
+++ b/crates/base_db/src/lib.rs
@@ -18,7 +18,7 @@ pub use crate::{
18 }, 18 },
19}; 19};
20pub use salsa; 20pub use salsa;
21pub use vfs::{file_set::FileSet, FileId, VfsPath}; 21pub use vfs::{file_set::FileSet, AnchoredPath, AnchoredPathBuf, FileId, VfsPath};
22 22
23#[macro_export] 23#[macro_export]
24macro_rules! impl_intern_key { 24macro_rules! impl_intern_key {
@@ -156,10 +156,11 @@ impl<T: SourceDatabaseExt> FileLoader for FileLoaderDelegate<&'_ T> {
156 SourceDatabaseExt::file_text(self.0, file_id) 156 SourceDatabaseExt::file_text(self.0, file_id)
157 } 157 }
158 fn resolve_path(&self, anchor: FileId, path: &str) -> Option<FileId> { 158 fn resolve_path(&self, anchor: FileId, path: &str) -> Option<FileId> {
159 let path = AnchoredPath { anchor, path };
159 // FIXME: this *somehow* should be platform agnostic... 160 // FIXME: this *somehow* should be platform agnostic...
160 let source_root = self.0.file_source_root(anchor); 161 let source_root = self.0.file_source_root(path.anchor);
161 let source_root = self.0.source_root(source_root); 162 let source_root = self.0.source_root(source_root);
162 source_root.file_set.resolve_path(anchor, path) 163 source_root.file_set.resolve_path(path)
163 } 164 }
164 165
165 fn relevant_crates(&self, file_id: FileId) -> Arc<FxHashSet<CrateId>> { 166 fn relevant_crates(&self, file_id: FileId) -> Arc<FxHashSet<CrateId>> {