diff options
-rw-r--r-- | Cargo.lock | 16 | ||||
-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 |
4 files changed, 12 insertions, 47 deletions
diff --git a/Cargo.lock b/Cargo.lock index c9227c911..0f7a45d6c 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -962,28 +962,13 @@ dependencies = [ | |||
962 | name = "ra_hir" | 962 | name = "ra_hir" |
963 | version = "0.1.0" | 963 | version = "0.1.0" |
964 | dependencies = [ | 964 | dependencies = [ |
965 | "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
966 | "chalk-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", | ||
967 | "chalk-rust-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", | ||
968 | "chalk-solve 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", | ||
969 | "ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
970 | "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
971 | "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
972 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | 965 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", |
973 | "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
974 | "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
975 | "ra_arena 0.1.0", | ||
976 | "ra_cfg 0.1.0", | ||
977 | "ra_db 0.1.0", | 966 | "ra_db 0.1.0", |
978 | "ra_hir_def 0.1.0", | 967 | "ra_hir_def 0.1.0", |
979 | "ra_hir_expand 0.1.0", | 968 | "ra_hir_expand 0.1.0", |
980 | "ra_hir_ty 0.1.0", | 969 | "ra_hir_ty 0.1.0", |
981 | "ra_mbe 0.1.0", | ||
982 | "ra_prof 0.1.0", | ||
983 | "ra_syntax 0.1.0", | 970 | "ra_syntax 0.1.0", |
984 | "ra_tt 0.1.0", | ||
985 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", | 971 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", |
986 | "test_utils 0.1.0", | ||
987 | ] | 972 | ] |
988 | 973 | ||
989 | [[package]] | 974 | [[package]] |
@@ -1031,7 +1016,6 @@ dependencies = [ | |||
1031 | "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1016 | "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1032 | "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", | 1017 | "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", |
1033 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | 1018 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", |
1034 | "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1035 | "ra_arena 0.1.0", | 1019 | "ra_arena 0.1.0", |
1036 | "ra_db 0.1.0", | 1020 | "ra_db 0.1.0", |
1037 | "ra_hir_def 0.1.0", | 1021 | "ra_hir_def 0.1.0", |
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> { |