Skip to content

Commit

Permalink
Merge #11415
Browse files Browse the repository at this point in the history
11415: Downgrade `dashmap` and bump `thread_local` r=lnicola a=lnicola

Closes #11341

bors r+

Co-authored-by: Laurențiu Nicola <[email protected]>
  • Loading branch information
bors[bot] and lnicola authored Feb 5, 2022
2 parents dd05d12 + d0f371c commit 6689470
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 74 deletions.
113 changes: 50 additions & 63 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions crates/hir_def/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ doctest = false

[dependencies]
cov-mark = "2.0.0-pre.1"
dashmap = { version = "5.0", features = ["raw-api"] }
lock_api = "0.4"
parking_lot = "0.11"
dashmap = { version = "4.0.2", features = ["raw-api"] }
tracing = "0.1"
once_cell = "1.3.1"
rustc-hash = "1.1.0"
Expand Down
11 changes: 3 additions & 8 deletions crates/hir_def/src/intern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,15 @@ use std::{
sync::Arc,
};

use dashmap::{DashMap, SharedValue};
use lock_api::RwLockWriteGuard;
use dashmap::{lock::RwLockWriteGuard, DashMap, SharedValue};
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<
'static,
RawRwLock,
HashMap<Arc<T>, SharedValue<()>, BuildHasherDefault<FxHasher>>,
>;
type Guard<T> =
RwLockWriteGuard<'static, HashMap<Arc<T>, SharedValue<()>, BuildHasherDefault<FxHasher>>>;

pub struct Interned<T: Internable + ?Sized> {
arc: Arc<T>,
Expand Down

0 comments on commit 6689470

Please sign in to comment.