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.rs10
-rw-r--r--crates/ra_db/src/lib.rs4
2 files changed, 8 insertions, 6 deletions
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs
index 51daa8e86..cccf37cc2 100644
--- a/crates/ra_db/src/input.rs
+++ b/crates/ra_db/src/input.rs
@@ -8,8 +8,6 @@ use salsa;
8#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] 8#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
9pub struct SourceRootId(pub u32); 9pub struct SourceRootId(pub u32);
10 10
11pub const WORKSPACE: SourceRootId = SourceRootId(0);
12
13#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 11#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
14pub struct FileId(pub u32); 12pub struct FileId(pub u32);
15 13
@@ -102,8 +100,12 @@ salsa::query_group! {
102 type SourceRootQuery; 100 type SourceRootQuery;
103 storage input; 101 storage input;
104 } 102 }
105 fn libraries() -> Arc<Vec<SourceRootId>> { 103 fn local_roots() -> Arc<Vec<SourceRootId>> {
106 type LibrariesQuery; 104 type LocalRootsQuery;
105 storage input;
106 }
107 fn library_roots() -> Arc<Vec<SourceRootId>> {
108 type LibraryRootsQuery;
107 storage input; 109 storage input;
108 } 110 }
109 fn crate_graph() -> Arc<CrateGraph> { 111 fn crate_graph() -> Arc<CrateGraph> {
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs
index eeb305b1b..65fa3cbfa 100644
--- a/crates/ra_db/src/lib.rs
+++ b/crates/ra_db/src/lib.rs
@@ -24,8 +24,8 @@ impl std::error::Error for Canceled {}
24pub use crate::{ 24pub use crate::{
25 syntax_ptr::LocalSyntaxPtr, 25 syntax_ptr::LocalSyntaxPtr,
26 input::{ 26 input::{
27 FilesDatabase, FileId, CrateId, SourceRoot, SourceRootId, CrateGraph, WORKSPACE, 27 FilesDatabase, FileId, CrateId, SourceRoot, SourceRootId, CrateGraph,
28 FileTextQuery, FileSourceRootQuery, SourceRootQuery, LibrariesQuery, CrateGraphQuery, 28 FileTextQuery, FileSourceRootQuery, SourceRootQuery, LocalRootsQuery, LibraryRootsQuery, CrateGraphQuery,
29 FileRelativePathQuery 29 FileRelativePathQuery
30 }, 30 },
31 loc2id::{LocationIntener, NumericId}, 31 loc2id::{LocationIntener, NumericId},