mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
use relpaths for module resolve
This commit is contained in:
parent
a422d480a1
commit
cb6205c09d
4 changed files with 35 additions and 18 deletions
|
@ -1,6 +1,7 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use rustc_hash::{FxHashSet, FxHashMap};
|
||||
use relative_path::RelativePathBuf;
|
||||
use ra_syntax::SmolStr;
|
||||
use salsa;
|
||||
|
||||
|
@ -85,10 +86,23 @@ salsa::query_group! {
|
|||
type FileTextQuery;
|
||||
storage input;
|
||||
}
|
||||
/// Path to a file, relative to the root of its source root.
|
||||
fn file_relative_path(file_id: FileId) -> RelativePathBuf {
|
||||
type FileRelativePathQuery;
|
||||
storage input;
|
||||
}
|
||||
fn file_source_root(file_id: FileId) -> SourceRootId {
|
||||
type FileSourceRootQuery;
|
||||
storage input;
|
||||
}
|
||||
fn source_root_files(id: SourceRootId) -> Arc<FxHashSet<FileId>> {
|
||||
type SourceRootFilesQuery;
|
||||
storage input;
|
||||
}
|
||||
fn source_root_file_by_path(id: SourceRootId, path: RelativePathBuf) -> Option<FileId> {
|
||||
type SourceRootFilesByPathQuery;
|
||||
storage input;
|
||||
}
|
||||
fn source_root(id: SourceRootId) -> Arc<SourceRoot> {
|
||||
type SourceRootQuery;
|
||||
storage input;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue