about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock16
-rw-r--r--crates/ra_hir/Cargo.toml20
-rw-r--r--crates/ra_hir_ty/Cargo.toml11
-rw-r--r--crates/ra_hir_ty/src/test_db.rs12
4 files changed, 12 insertions, 47 deletions
diff --git a/Cargo.lock b/Cargo.lock
index c9227c911d4..0f7a45d6cb7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -962,28 +962,13 @@ dependencies = [
 name = "ra_hir"
 version = "0.1.0"
 dependencies = [
- "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "chalk-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
- "chalk-rust-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
- "chalk-solve 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
- "ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "ra_arena 0.1.0",
- "ra_cfg 0.1.0",
  "ra_db 0.1.0",
  "ra_hir_def 0.1.0",
  "ra_hir_expand 0.1.0",
  "ra_hir_ty 0.1.0",
- "ra_mbe 0.1.0",
- "ra_prof 0.1.0",
  "ra_syntax 0.1.0",
- "ra_tt 0.1.0",
  "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "test_utils 0.1.0",
 ]
 
 [[package]]
@@ -1031,7 +1016,6 @@ dependencies = [
  "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "ra_arena 0.1.0",
  "ra_db 0.1.0",
  "ra_hir_def 0.1.0",
diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml
index caba85a4f07..e79361e7cc9 100644
--- a/crates/ra_hir/Cargo.toml
+++ b/crates/ra_hir/Cargo.toml
@@ -8,31 +8,11 @@ authors = ["rust-analyzer developers"]
 doctest = false
 
 [dependencies]
-arrayvec = "0.5.1"
 log = "0.4.5"
 rustc-hash = "1.0"
-parking_lot = "0.10.0"
-ena = "0.13"
-once_cell = "1.0.1"
 
 ra_syntax = { path = "../ra_syntax" }
-ra_arena = { path = "../ra_arena" }
-ra_cfg = { path = "../ra_cfg" }
 ra_db = { path = "../ra_db" }
-mbe = { path = "../ra_mbe", package = "ra_mbe" }
-tt = { path = "../ra_tt", package = "ra_tt" }
 hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
 hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
 hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" }
-test_utils = { path = "../test_utils" }
-ra_prof = { path = "../ra_prof" }
-
-# https://github.com/rust-lang/chalk/pull/294
-chalk-solve =   { git = "https://github.com/jackh726/chalk.git", rev = "095cd38a4f16337913bba487f2055b9ca0179f30" }
-chalk-rust-ir = { git = "https://github.com/jackh726/chalk.git", rev = "095cd38a4f16337913bba487f2055b9ca0179f30" }
-chalk-ir =      { git = "https://github.com/jackh726/chalk.git", rev = "095cd38a4f16337913bba487f2055b9ca0179f30" }
-
-lalrpop-intern = "0.15.1"
-
-[dev-dependencies]
-insta = "0.12.0"
diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml
index 199afff493c..429242870f9 100644
--- a/crates/ra_hir_ty/Cargo.toml
+++ b/crates/ra_hir_ty/Cargo.toml
@@ -9,18 +9,17 @@ doctest = false
 
 [dependencies]
 arrayvec = "0.5.1"
+ena = "0.13"
 log = "0.4.5"
 rustc-hash = "1.0"
-parking_lot = "0.10.0"
-ena = "0.13"
 
-ra_syntax = { path = "../ra_syntax" }
+hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
+hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
 ra_arena = { path = "../ra_arena" }
 ra_db = { path = "../ra_db" }
-hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
-hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
-test_utils = { path = "../test_utils" }
 ra_prof = { path = "../ra_prof" }
+ra_syntax = { path = "../ra_syntax" }
+test_utils = { path = "../test_utils" }
 
 # https://github.com/rust-lang/chalk/pull/294
 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 0e51f4130f3..8743570085c 100644
--- a/crates/ra_hir_ty/src/test_db.rs
+++ b/crates/ra_hir_ty/src/test_db.rs
@@ -1,10 +1,12 @@
 //! Database used for testing `hir`.
 
-use std::{panic, sync::Arc};
+use std::{
+    panic,
+    sync::{Arc, Mutex},
+};
 
 use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId, ModuleId};
 use hir_expand::diagnostics::DiagnosticSink;
-use parking_lot::Mutex;
 use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath, SourceDatabase};
 
 use crate::{db::HirDatabase, expr::ExprValidator};
@@ -33,7 +35,7 @@ impl salsa::Database for TestDB {
     }
 
     fn salsa_event(&self, event: impl Fn() -> salsa::Event<TestDB>) {
-        let mut events = self.events.lock();
+        let mut events = self.events.lock().unwrap();
         if let Some(events) = &mut *events {
             events.push(event());
         }
@@ -122,9 +124,9 @@ impl TestDB {
 
 impl TestDB {
     pub fn log(&self, f: impl FnOnce()) -> Vec<salsa::Event<TestDB>> {
-        *self.events.lock() = Some(Vec::new());
+        *self.events.lock().unwrap() = Some(Vec::new());
         f();
-        self.events.lock().take().unwrap()
+        self.events.lock().unwrap().take().unwrap()
     }
 
     pub fn log_executed(&self, f: impl FnOnce()) -> Vec<String> {