aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-25 20:43:09 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-25 20:43:09 +0000
commit3c7acecade09e1234ac7b1d1ed2f22edbc543f64 (patch)
tree462edbf67d8647a21c16720d621a164293651c79 /crates/ra_ide_api
parentd0ddc5a7c1e3f3df09f4e3637cc80459d8273310 (diff)
parentc2474fcd386a267cf49f6d9d47ca6ff4585ca330 (diff)
Merge #656
656: :arrow_up deps r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/Cargo.toml1
-rw-r--r--crates/ra_ide_api/src/db.rs12
-rw-r--r--crates/ra_ide_api/src/imp.rs10
-rw-r--r--crates/ra_ide_api/src/symbol_index.rs2
4 files changed, 12 insertions, 13 deletions
diff --git a/crates/ra_ide_api/Cargo.toml b/crates/ra_ide_api/Cargo.toml
index dfdddea50..79e473463 100644
--- a/crates/ra_ide_api/Cargo.toml
+++ b/crates/ra_ide_api/Cargo.toml
@@ -14,7 +14,6 @@ fst = "0.3.1"
14rustc-hash = "1.0" 14rustc-hash = "1.0"
15parking_lot = "0.7.0" 15parking_lot = "0.7.0"
16unicase = "2.2.0" 16unicase = "2.2.0"
17salsa = "0.10.0-alpha3"
18 17
19ra_syntax = { path = "../ra_syntax" } 18ra_syntax = { path = "../ra_syntax" }
20ra_ide_api_light = { path = "../ra_ide_api_light" } 19ra_ide_api_light = { path = "../ra_ide_api_light" }
diff --git a/crates/ra_ide_api/src/db.rs b/crates/ra_ide_api/src/db.rs
index f0190ae51..30891aed4 100644
--- a/crates/ra_ide_api/src/db.rs
+++ b/crates/ra_ide_api/src/db.rs
@@ -8,11 +8,11 @@ use ra_db::{
8use crate::{symbol_index, LineIndex}; 8use crate::{symbol_index, LineIndex};
9 9
10#[salsa::database( 10#[salsa::database(
11 ra_db::FilesDatabase, 11 ra_db::FilesDatabaseStorage,
12 ra_db::SyntaxDatabase, 12 ra_db::SyntaxDatabaseStorage,
13 LineIndexDatabase, 13 LineIndexDatabaseStorage,
14 symbol_index::SymbolsDatabase, 14 symbol_index::SymbolsDatabaseStorage,
15 hir::db::HirDatabase 15 hir::db::HirDatabaseStorage
16)] 16)]
17#[derive(Debug)] 17#[derive(Debug)]
18pub(crate) struct RootDatabase { 18pub(crate) struct RootDatabase {
@@ -62,7 +62,7 @@ impl AsRef<hir::HirInterner> for RootDatabase {
62 } 62 }
63} 63}
64 64
65#[salsa::query_group] 65#[salsa::query_group(LineIndexDatabaseStorage)]
66pub(crate) trait LineIndexDatabase: ra_db::FilesDatabase + BaseDatabase { 66pub(crate) trait LineIndexDatabase: ra_db::FilesDatabase + BaseDatabase {
67 fn line_index(&self, file_id: FileId) -> Arc<LineIndex>; 67 fn line_index(&self, file_id: FileId) -> Arc<LineIndex>;
68} 68}
diff --git a/crates/ra_ide_api/src/imp.rs b/crates/ra_ide_api/src/imp.rs
index 961f7b230..bd9e3f1e3 100644
--- a/crates/ra_ide_api/src/imp.rs
+++ b/crates/ra_ide_api/src/imp.rs
@@ -5,7 +5,7 @@ use hir::{
5}; 5};
6use ra_db::{ 6use ra_db::{
7 FilesDatabase, SourceRoot, SourceRootId, SyntaxDatabase, 7 FilesDatabase, SourceRoot, SourceRootId, SyntaxDatabase,
8 salsa::Database, 8 salsa::{Database, SweepStrategy},
9}; 9};
10use ra_ide_api_light::{self, assists, LocalEdit, Severity}; 10use ra_ide_api_light::{self, assists, LocalEdit, Severity};
11use ra_syntax::{ 11use ra_syntax::{
@@ -77,13 +77,13 @@ impl db::RootDatabase {
77 /// for some reason. Needs investigation. 77 /// for some reason. Needs investigation.
78 pub(crate) fn collect_garbage(&mut self) { 78 pub(crate) fn collect_garbage(&mut self) {
79 self.query(ra_db::SourceFileQuery) 79 self.query(ra_db::SourceFileQuery)
80 .sweep(salsa::SweepStrategy::default().discard_values()); 80 .sweep(SweepStrategy::default().discard_values());
81 self.query(hir::db::HirSourceFileQuery) 81 self.query(hir::db::HirSourceFileQuery)
82 .sweep(salsa::SweepStrategy::default().discard_values()); 82 .sweep(SweepStrategy::default().discard_values());
83 self.query(hir::db::FileItemsQuery) 83 self.query(hir::db::FileItemsQuery)
84 .sweep(salsa::SweepStrategy::default().discard_values()); 84 .sweep(SweepStrategy::default().discard_values());
85 self.query(hir::db::FileItemQuery) 85 self.query(hir::db::FileItemQuery)
86 .sweep(salsa::SweepStrategy::default().discard_values()); 86 .sweep(SweepStrategy::default().discard_values());
87 } 87 }
88} 88}
89 89
diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide_api/src/symbol_index.rs
index 6184ad3ec..e073a349e 100644
--- a/crates/ra_ide_api/src/symbol_index.rs
+++ b/crates/ra_ide_api/src/symbol_index.rs
@@ -44,7 +44,7 @@ use crate::{
44 db::RootDatabase, 44 db::RootDatabase,
45}; 45};
46 46
47#[salsa::query_group] 47#[salsa::query_group(SymbolsDatabaseStorage)]
48pub(crate) trait SymbolsDatabase: hir::db::HirDatabase { 48pub(crate) trait SymbolsDatabase: hir::db::HirDatabase {
49 fn file_symbols(&self, file_id: FileId) -> Arc<SymbolIndex>; 49 fn file_symbols(&self, file_id: FileId) -> Arc<SymbolIndex>;
50 #[salsa::input] 50 #[salsa::input]