Skip to content

Commit 485f318

Browse files
committed
Bump dashmap
1 parent 8b779e8 commit 485f318

File tree

3 files changed

+74
-54
lines changed

3 files changed

+74
-54
lines changed

Cargo.lock

Lines changed: 63 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/hir_def/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ doctest = false
1111

1212
[dependencies]
1313
cov-mark = "2.0.0-pre.1"
14-
dashmap = { version = "4.0.2", features = ["raw-api"] }
14+
dashmap = { version = "5.0", features = ["raw-api"] }
15+
lock_api = "0.4"
16+
parking_lot = "0.11"
1517
tracing = "0.1"
1618
once_cell = "1.3.1"
1719
rustc-hash = "1.1.0"

crates/hir_def/src/intern.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,20 @@ use std::{
1010
sync::Arc,
1111
};
1212

13-
use dashmap::{lock::RwLockWriteGuard, DashMap, SharedValue};
13+
use dashmap::{DashMap, SharedValue};
14+
use lock_api::RwLockWriteGuard;
1415
use once_cell::sync::OnceCell;
16+
use parking_lot::RawRwLock;
1517
use rustc_hash::FxHasher;
1618

1719
use crate::generics::GenericParams;
1820

1921
type InternMap<T> = DashMap<Arc<T>, (), BuildHasherDefault<FxHasher>>;
20-
type Guard<T> =
21-
RwLockWriteGuard<'static, HashMap<Arc<T>, SharedValue<()>, BuildHasherDefault<FxHasher>>>;
22+
type Guard<T> = RwLockWriteGuard<
23+
'static,
24+
RawRwLock,
25+
HashMap<Arc<T>, SharedValue<()>, BuildHasherDefault<FxHasher>>,
26+
>;
2227

2328
pub struct Interned<T: Internable + ?Sized> {
2429
arc: Arc<T>,

0 commit comments

Comments
 (0)