aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_db')
-rw-r--r--crates/ra_db/src/input.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs
index ac144b991..b09014dc6 100644
--- a/crates/ra_db/src/input.rs
+++ b/crates/ra_db/src/input.rs
@@ -1,6 +1,7 @@
1use std::sync::Arc; 1use std::sync::Arc;
2 2
3use rustc_hash::{FxHashSet, FxHashMap}; 3use rustc_hash::{FxHashSet, FxHashMap};
4use relative_path::RelativePathBuf;
4use ra_syntax::SmolStr; 5use ra_syntax::SmolStr;
5use salsa; 6use salsa;
6 7
@@ -85,10 +86,23 @@ salsa::query_group! {
85 type FileTextQuery; 86 type FileTextQuery;
86 storage input; 87 storage input;
87 } 88 }
89 /// Path to a file, relative to the root of its source root.
90 fn file_relative_path(file_id: FileId) -> RelativePathBuf {
91 type FileRelativePathQuery;
92 storage input;
93 }
88 fn file_source_root(file_id: FileId) -> SourceRootId { 94 fn file_source_root(file_id: FileId) -> SourceRootId {
89 type FileSourceRootQuery; 95 type FileSourceRootQuery;
90 storage input; 96 storage input;
91 } 97 }
98 fn source_root_files(id: SourceRootId) -> Arc<FxHashSet<FileId>> {
99 type SourceRootFilesQuery;
100 storage input;
101 }
102 fn source_root_file_by_path(id: SourceRootId, path: RelativePathBuf) -> Option<FileId> {
103 type SourceRootFilesByPathQuery;
104 storage input;
105 }
92 fn source_root(id: SourceRootId) -> Arc<SourceRoot> { 106 fn source_root(id: SourceRootId) -> Arc<SourceRoot> {
93 type SourceRootQuery; 107 type SourceRootQuery;
94 storage input; 108 storage input;