From 5e3891c2559de5a6540d69bc14ded281484479f9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 9 Dec 2020 18:41:35 +0300 Subject: . --- crates/base_db/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crates/base_db') 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::{ }, }; pub use salsa; -pub use vfs::{file_set::FileSet, FileId, VfsPath}; +pub use vfs::{file_set::FileSet, AnchoredPath, AnchoredPathBuf, FileId, VfsPath}; #[macro_export] macro_rules! impl_intern_key { @@ -156,10 +156,11 @@ impl FileLoader for FileLoaderDelegate<&'_ T> { SourceDatabaseExt::file_text(self.0, file_id) } fn resolve_path(&self, anchor: FileId, path: &str) -> Option { + let path = AnchoredPath { anchor, path }; // FIXME: this *somehow* should be platform agnostic... - let source_root = self.0.file_source_root(anchor); + let source_root = self.0.file_source_root(path.anchor); let source_root = self.0.source_root(source_root); - source_root.file_set.resolve_path(anchor, path) + source_root.file_set.resolve_path(path) } fn relevant_crates(&self, file_id: FileId) -> Arc> { -- cgit v1.2.3