diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir/Cargo.toml | 20 | ||||
-rw-r--r-- | crates/ra_hir_ty/Cargo.toml | 11 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/test_db.rs | 12 |
3 files changed, 12 insertions, 31 deletions
diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml index caba85a4f..e79361e7c 100644 --- a/crates/ra_hir/Cargo.toml +++ b/crates/ra_hir/Cargo.toml | |||
@@ -8,31 +8,11 @@ authors = ["rust-analyzer developers"] | |||
8 | doctest = false | 8 | doctest = false |
9 | 9 | ||
10 | [dependencies] | 10 | [dependencies] |
11 | arrayvec = "0.5.1" | ||
12 | log = "0.4.5" | 11 | log = "0.4.5" |
13 | rustc-hash = "1.0" | 12 | rustc-hash = "1.0" |
14 | parking_lot = "0.10.0" | ||
15 | ena = "0.13" | ||
16 | once_cell = "1.0.1" | ||
17 | 13 | ||
18 | ra_syntax = { path = "../ra_syntax" } | 14 | ra_syntax = { path = "../ra_syntax" } |
19 | ra_arena = { path = "../ra_arena" } | ||
20 | ra_cfg = { path = "../ra_cfg" } | ||
21 | ra_db = { path = "../ra_db" } | 15 | ra_db = { path = "../ra_db" } |
22 | mbe = { path = "../ra_mbe", package = "ra_mbe" } | ||
23 | tt = { path = "../ra_tt", package = "ra_tt" } | ||
24 | hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } | 16 | hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } |
25 | hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } | 17 | hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } |
26 | hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" } | 18 | hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" } |
27 | test_utils = { path = "../test_utils" } | ||
28 | ra_prof = { path = "../ra_prof" } | ||
29 | |||
30 | # https://github.com/rust-lang/chalk/pull/294 | ||
31 | chalk-solve = { git = "https://github.com/jackh726/chalk.git", rev = "095cd38a4f16337913bba487f2055b9ca0179f30" } | ||
32 | chalk-rust-ir = { git = "https://github.com/jackh726/chalk.git", rev = "095cd38a4f16337913bba487f2055b9ca0179f30" } | ||
33 | chalk-ir = { git = "https://github.com/jackh726/chalk.git", rev = "095cd38a4f16337913bba487f2055b9ca0179f30" } | ||
34 | |||
35 | lalrpop-intern = "0.15.1" | ||
36 | |||
37 | [dev-dependencies] | ||
38 | insta = "0.12.0" | ||
diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml index 199afff49..429242870 100644 --- a/crates/ra_hir_ty/Cargo.toml +++ b/crates/ra_hir_ty/Cargo.toml | |||
@@ -9,18 +9,17 @@ doctest = false | |||
9 | 9 | ||
10 | [dependencies] | 10 | [dependencies] |
11 | arrayvec = "0.5.1" | 11 | arrayvec = "0.5.1" |
12 | ena = "0.13" | ||
12 | log = "0.4.5" | 13 | log = "0.4.5" |
13 | rustc-hash = "1.0" | 14 | rustc-hash = "1.0" |
14 | parking_lot = "0.10.0" | ||
15 | ena = "0.13" | ||
16 | 15 | ||
17 | ra_syntax = { path = "../ra_syntax" } | 16 | hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } |
17 | hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } | ||
18 | ra_arena = { path = "../ra_arena" } | 18 | ra_arena = { path = "../ra_arena" } |
19 | ra_db = { path = "../ra_db" } | 19 | ra_db = { path = "../ra_db" } |
20 | hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } | ||
21 | hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } | ||
22 | test_utils = { path = "../test_utils" } | ||
23 | ra_prof = { path = "../ra_prof" } | 20 | ra_prof = { path = "../ra_prof" } |
21 | ra_syntax = { path = "../ra_syntax" } | ||
22 | test_utils = { path = "../test_utils" } | ||
24 | 23 | ||
25 | # https://github.com/rust-lang/chalk/pull/294 | 24 | # https://github.com/rust-lang/chalk/pull/294 |
26 | chalk-solve = { git = "https://github.com/jackh726/chalk.git", rev = "095cd38a4f16337913bba487f2055b9ca0179f30" } | 25 | chalk-solve = { git = "https://github.com/jackh726/chalk.git", rev = "095cd38a4f16337913bba487f2055b9ca0179f30" } |
diff --git a/crates/ra_hir_ty/src/test_db.rs b/crates/ra_hir_ty/src/test_db.rs index 0e51f4130..874357008 100644 --- a/crates/ra_hir_ty/src/test_db.rs +++ b/crates/ra_hir_ty/src/test_db.rs | |||
@@ -1,10 +1,12 @@ | |||
1 | //! Database used for testing `hir`. | 1 | //! Database used for testing `hir`. |
2 | 2 | ||
3 | use std::{panic, sync::Arc}; | 3 | use std::{ |
4 | panic, | ||
5 | sync::{Arc, Mutex}, | ||
6 | }; | ||
4 | 7 | ||
5 | use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId, ModuleId}; | 8 | use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId, ModuleId}; |
6 | use hir_expand::diagnostics::DiagnosticSink; | 9 | use hir_expand::diagnostics::DiagnosticSink; |
7 | use parking_lot::Mutex; | ||
8 | use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath, SourceDatabase}; | 10 | use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath, SourceDatabase}; |
9 | 11 | ||
10 | use crate::{db::HirDatabase, expr::ExprValidator}; | 12 | use crate::{db::HirDatabase, expr::ExprValidator}; |
@@ -33,7 +35,7 @@ impl salsa::Database for TestDB { | |||
33 | } | 35 | } |
34 | 36 | ||
35 | fn salsa_event(&self, event: impl Fn() -> salsa::Event<TestDB>) { | 37 | fn salsa_event(&self, event: impl Fn() -> salsa::Event<TestDB>) { |
36 | let mut events = self.events.lock(); | 38 | let mut events = self.events.lock().unwrap(); |
37 | if let Some(events) = &mut *events { | 39 | if let Some(events) = &mut *events { |
38 | events.push(event()); | 40 | events.push(event()); |
39 | } | 41 | } |
@@ -122,9 +124,9 @@ impl TestDB { | |||
122 | 124 | ||
123 | impl TestDB { | 125 | impl TestDB { |
124 | pub fn log(&self, f: impl FnOnce()) -> Vec<salsa::Event<TestDB>> { | 126 | pub fn log(&self, f: impl FnOnce()) -> Vec<salsa::Event<TestDB>> { |
125 | *self.events.lock() = Some(Vec::new()); | 127 | *self.events.lock().unwrap() = Some(Vec::new()); |
126 | f(); | 128 | f(); |
127 | self.events.lock().take().unwrap() | 129 | self.events.lock().unwrap().take().unwrap() |
128 | } | 130 | } |
129 | 131 | ||
130 | pub fn log_executed(&self, f: impl FnOnce()) -> Vec<String> { | 132 | pub fn log_executed(&self, f: impl FnOnce()) -> Vec<String> { |