diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-25 20:43:09 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-25 20:43:09 +0000 |
commit | 3c7acecade09e1234ac7b1d1ed2f22edbc543f64 (patch) | |
tree | 462edbf67d8647a21c16720d621a164293651c79 /crates/ra_hir | |
parent | d0ddc5a7c1e3f3df09f4e3637cc80459d8273310 (diff) | |
parent | c2474fcd386a267cf49f6d9d47ca6ff4585ca330 (diff) |
Merge #656
656: :arrow_up deps r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_hir/src/db.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/mock.rs | 8 |
3 files changed, 7 insertions, 4 deletions
diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml index 3d802ade4..57a4b155b 100644 --- a/crates/ra_hir/Cargo.toml +++ b/crates/ra_hir/Cargo.toml | |||
@@ -12,7 +12,6 @@ rustc-hash = "1.0" | |||
12 | parking_lot = "0.7.0" | 12 | parking_lot = "0.7.0" |
13 | ena = "0.11" | 13 | ena = "0.11" |
14 | join_to_string = "0.1.3" | 14 | join_to_string = "0.1.3" |
15 | salsa = "0.10.0-alpha3" | ||
16 | 15 | ||
17 | ra_syntax = { path = "../ra_syntax" } | 16 | ra_syntax = { path = "../ra_syntax" } |
18 | ra_arena = { path = "../ra_arena" } | 17 | ra_arena = { path = "../ra_arena" } |
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index 3c82262a2..dfbf41bd6 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -18,7 +18,7 @@ use crate::{ | |||
18 | generics::{GenericParams, GenericDef}, | 18 | generics::{GenericParams, GenericDef}, |
19 | }; | 19 | }; |
20 | 20 | ||
21 | #[salsa::query_group] | 21 | #[salsa::query_group(HirDatabaseStorage)] |
22 | pub trait HirDatabase: SyntaxDatabase + AsRef<HirInterner> { | 22 | pub trait HirDatabase: SyntaxDatabase + AsRef<HirInterner> { |
23 | #[salsa::invoke(HirFileId::hir_source_file)] | 23 | #[salsa::invoke(HirFileId::hir_source_file)] |
24 | fn hir_source_file(&self, file_id: HirFileId) -> TreeArc<SourceFile>; | 24 | fn hir_source_file(&self, file_id: HirFileId) -> TreeArc<SourceFile>; |
diff --git a/crates/ra_hir/src/mock.rs b/crates/ra_hir/src/mock.rs index 36b174cd6..2dc252b1e 100644 --- a/crates/ra_hir/src/mock.rs +++ b/crates/ra_hir/src/mock.rs | |||
@@ -2,7 +2,7 @@ use std::{sync::Arc, panic}; | |||
2 | 2 | ||
3 | use parking_lot::Mutex; | 3 | use parking_lot::Mutex; |
4 | use ra_db::{ | 4 | use ra_db::{ |
5 | BaseDatabase, FilePosition, FileId, CrateGraph, SourceRoot, SourceRootId, FilesDatabase, | 5 | BaseDatabase, FilePosition, FileId, CrateGraph, SourceRoot, SourceRootId, FilesDatabase, salsa, |
6 | }; | 6 | }; |
7 | use relative_path::RelativePathBuf; | 7 | use relative_path::RelativePathBuf; |
8 | use test_utils::{parse_fixture, CURSOR_MARKER, extract_offset}; | 8 | use test_utils::{parse_fixture, CURSOR_MARKER, extract_offset}; |
@@ -11,7 +11,11 @@ use crate::{db, HirInterner}; | |||
11 | 11 | ||
12 | pub const WORKSPACE: SourceRootId = SourceRootId(0); | 12 | pub const WORKSPACE: SourceRootId = SourceRootId(0); |
13 | 13 | ||
14 | #[salsa::database(ra_db::FilesDatabase, ra_db::SyntaxDatabase, db::HirDatabase)] | 14 | #[salsa::database( |
15 | ra_db::FilesDatabaseStorage, | ||
16 | ra_db::SyntaxDatabaseStorage, | ||
17 | db::HirDatabaseStorage | ||
18 | )] | ||
15 | #[derive(Debug)] | 19 | #[derive(Debug)] |
16 | pub(crate) struct MockDatabase { | 20 | pub(crate) struct MockDatabase { |
17 | events: Mutex<Option<Vec<salsa::Event<MockDatabase>>>>, | 21 | events: Mutex<Option<Vec<salsa::Event<MockDatabase>>>>, |