Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--Cargo.lock12
-rw-r--r--crates/hir-def/Cargo.toml22
-rw-r--r--crates/hir-def/src/intern.rs7
3 files changed, 19 insertions, 22 deletions
diff --git a/Cargo.lock b/Cargo.lock
index f3bd3d6b76..b736e00400 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -294,13 +294,14 @@ dependencies = [
[[package]]
name = "dashmap"
-version = "5.2.0"
+version = "5.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c8858831f7781322e539ea39e72449c46b059638250c14344fec8d0aa6e539c"
+checksum = "3495912c9c1ccf2e18976439f4443f3fee0fd61f424ff99fde6a66b15ecb448f"
dependencies = [
"cfg-if",
- "num_cpus",
- "parking_lot 0.12.0",
+ "hashbrown 0.12.1",
+ "lock_api",
+ "parking_lot_core 0.9.3",
]
[[package]]
@@ -505,15 +506,14 @@ dependencies = [
"either",
"expect-test",
"fst",
+ "hashbrown 0.12.1",
"hir-expand",
"indexmap",
"itertools",
"la-arena",
"limit",
- "lock_api",
"mbe",
"once_cell",
- "parking_lot 0.12.0",
"profile",
"rustc-hash",
"smallvec",
diff --git a/crates/hir-def/Cargo.toml b/crates/hir-def/Cargo.toml
index 8222212936..def8428d73 100644
--- a/crates/hir-def/Cargo.toml
+++ b/crates/hir-def/Cargo.toml
@@ -10,23 +10,23 @@ rust-version = "1.57"
doctest = false
[dependencies]
+anymap = "0.12.1"
+arrayvec = "0.7.2"
bitflags = "1.3.2"
cov-mark = "2.0.0-pre.1"
-dashmap = { version = "5.2.0", features = ["raw-api"] }
-lock_api = "0.4.6"
-parking_lot = "0.12.0"
-tracing = "0.1.32"
-once_cell = "1.10.0"
-rustc-hash = "1.1.0"
-either = "1.6.1"
-anymap = "0.12.1"
+# We need to freeze the version of the crate, as the raw-api feature is considered unstable
+dashmap = { version = "=5.3.4", features = ["raw-api"] }
drop_bomb = "0.1.5"
+either = "1.6.1"
fst = { version = "0.4.7", default-features = false }
-itertools = "0.10.3"
+hashbrown = { version = "0.12.1", default-features = false }
indexmap = "1.8.0"
-smallvec = "1.8.0"
-arrayvec = "0.7.2"
+itertools = "0.10.3"
la-arena = { version = "0.3.0", path = "../../lib/la-arena" }
+once_cell = "1.10.0"
+rustc-hash = "1.1.0"
+smallvec = "1.8.0"
+tracing = "0.1.32"
stdx = { path = "../stdx", version = "0.0.0" }
base-db = { path = "../base-db", version = "0.0.0" }
diff --git a/crates/hir-def/src/intern.rs b/crates/hir-def/src/intern.rs
index f5a4f5ec4e..f08521a340 100644
--- a/crates/hir-def/src/intern.rs
+++ b/crates/hir-def/src/intern.rs
@@ -3,7 +3,6 @@
//! Eventually this should probably be replaced with salsa-based interning.
use std::{
- collections::HashMap,
fmt::{self, Debug, Display},
hash::{BuildHasherDefault, Hash, Hasher},
ops::Deref,
@@ -11,17 +10,15 @@ use std::{
};
use dashmap::{DashMap, SharedValue};
-use lock_api::RwLockWriteGuard;
+use hashbrown::HashMap;
use once_cell::sync::OnceCell;
-use parking_lot::RawRwLock;
use rustc_hash::FxHasher;
use crate::generics::GenericParams;
type InternMap<T> = DashMap<Arc<T>, (), BuildHasherDefault<FxHasher>>;
-type Guard<T> = RwLockWriteGuard<
+type Guard<T> = dashmap::RwLockWriteGuard<
'static,
- RawRwLock,
HashMap<Arc<T>, SharedValue<()>, BuildHasherDefault<FxHasher>>,
>;