diff options
author | Aleksey Kladov <[email protected]> | 2019-11-27 18:23:31 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-27 18:26:49 +0000 |
commit | 47ec2ceb12df756b3482ddd2b1947e4b38f23706 (patch) | |
tree | b68c3da4bb47e0a285968319bfb33b44cbfd5546 /crates/ra_hir_ty | |
parent | a87579500a2c35597071efd0ad6983927f0c1815 (diff) |
prune deps
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r-- | crates/ra_hir_ty/Cargo.toml | 11 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/test_db.rs | 12 |
2 files changed, 12 insertions, 11 deletions
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> { |