aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-19 13:13:16 +0000
committerAleksey Kladov <[email protected]>2018-12-20 09:15:38 +0000
commite6465e7e2a7e136edd652d5f4c93b961dd652cbc (patch)
tree4e82bd6b881d322936f7528a95d87763dca2e18c /crates/ra_db
parent51fec4ef844d7fe83bf96c74e02e5f820837ff2d (diff)
index all local crates
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},