Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_def/src/intern.rs')
| -rw-r--r-- | crates/hir_def/src/intern.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crates/hir_def/src/intern.rs b/crates/hir_def/src/intern.rs index 79ba970e7b..f5a4f5ec4e 100644 --- a/crates/hir_def/src/intern.rs +++ b/crates/hir_def/src/intern.rs @@ -10,15 +10,20 @@ use std::{ sync::Arc, }; -use dashmap::{lock::RwLockWriteGuard, DashMap, SharedValue}; +use dashmap::{DashMap, SharedValue}; +use lock_api::RwLockWriteGuard; 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, HashMap<Arc<T>, SharedValue<()>, BuildHasherDefault<FxHasher>>>; +type Guard<T> = RwLockWriteGuard< + 'static, + RawRwLock, + HashMap<Arc<T>, SharedValue<()>, BuildHasherDefault<FxHasher>>, +>; pub struct Interned<T: Internable + ?Sized> { arc: Arc<T>, |