aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-25 20:27:16 +0000
committerAleksey Kladov <[email protected]>2019-01-25 20:27:16 +0000
commit1fd18f020dcf01a441925ac0a368a31f3ddf4047 (patch)
tree8468850033bff56da6829451922e5d90ce804fd2 /crates/ra_db
parentd65dca6bb3844d71ca14c396497783cbf9650e4a (diff)
:arrow_up: salsa
Diffstat (limited to 'crates/ra_db')
-rw-r--r--crates/ra_db/Cargo.toml3
-rw-r--r--crates/ra_db/src/lib.rs4
2 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_db/Cargo.toml b/crates/ra_db/Cargo.toml
index 3568da905..9aa77f72e 100644
--- a/crates/ra_db/Cargo.toml
+++ b/crates/ra_db/Cargo.toml
@@ -6,9 +6,10 @@ authors = ["Aleksey Kladov <[email protected]>"]
6 6
7[dependencies] 7[dependencies]
8relative-path = "0.4.0" 8relative-path = "0.4.0"
9salsa = "0.10.0-alpha3" 9salsa = "0.10.0-alpha4"
10rustc-hash = "1.0" 10rustc-hash = "1.0"
11parking_lot = "0.7.0" 11parking_lot = "0.7.0"
12
12ra_arena = { path = "../ra_arena" } 13ra_arena = { path = "../ra_arena" }
13ra_syntax = { path = "../ra_syntax" } 14ra_syntax = { path = "../ra_syntax" }
14test_utils = { path = "../test_utils" } 15test_utils = { path = "../test_utils" }
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs
index 7e13f70bc..3a0aa7d24 100644
--- a/crates/ra_db/src/lib.rs
+++ b/crates/ra_db/src/lib.rs
@@ -63,7 +63,7 @@ pub struct FileRange {
63 pub range: TextRange, 63 pub range: TextRange,
64} 64}
65 65
66#[salsa::query_group] 66#[salsa::query_group(FilesDatabaseStorage)]
67pub trait FilesDatabase: salsa::Database { 67pub trait FilesDatabase: salsa::Database {
68 /// Text of the file. 68 /// Text of the file.
69 #[salsa::input] 69 #[salsa::input]
@@ -102,7 +102,7 @@ fn source_root_crates(db: &impl FilesDatabase, id: SourceRootId) -> Arc<Vec<Crat
102 Arc::new(res) 102 Arc::new(res)
103} 103}
104 104
105#[salsa::query_group] 105#[salsa::query_group(SyntaxDatabaseStorage)]
106pub trait SyntaxDatabase: FilesDatabase + BaseDatabase { 106pub trait SyntaxDatabase: FilesDatabase + BaseDatabase {
107 fn source_file(&self, file_id: FileId) -> TreeArc<SourceFile>; 107 fn source_file(&self, file_id: FileId) -> TreeArc<SourceFile>;
108} 108}