summaryrefslogtreecommitdiffstats
path: root/src/tools/rust-analyzer/crates/intern/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/rust-analyzer/crates/intern/src/lib.rs (renamed from src/tools/rust-analyzer/crates/hir-def/src/intern.rs)19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/tools/rust-analyzer/crates/hir-def/src/intern.rs b/src/tools/rust-analyzer/crates/intern/src/lib.rs
index f08521a34..fb2903696 100644
--- a/src/tools/rust-analyzer/crates/hir-def/src/intern.rs
+++ b/src/tools/rust-analyzer/crates/intern/src/lib.rs
@@ -14,8 +14,6 @@ use hashbrown::HashMap;
use once_cell::sync::OnceCell;
use rustc_hash::FxHasher;
-use crate::generics::GenericParams;
-
type InternMap<T> = DashMap<Arc<T>, (), BuildHasherDefault<FxHasher>>;
type Guard<T> = dashmap::RwLockWriteGuard<
'static,
@@ -204,9 +202,9 @@ pub trait Internable: Hash + Eq + 'static {
#[doc(hidden)]
macro_rules! _impl_internable {
( $($t:path),+ $(,)? ) => { $(
- impl Internable for $t {
- fn storage() -> &'static InternStorage<Self> {
- static STORAGE: InternStorage<$t> = InternStorage::new();
+ impl $crate::Internable for $t {
+ fn storage() -> &'static $crate::InternStorage<Self> {
+ static STORAGE: $crate::InternStorage<$t> = $crate::InternStorage::new();
&STORAGE
}
}
@@ -215,13 +213,4 @@ macro_rules! _impl_internable {
pub use crate::_impl_internable as impl_internable;
-impl_internable!(
- crate::type_ref::TypeRef,
- crate::type_ref::TraitRef,
- crate::type_ref::TypeBound,
- crate::path::ModPath,
- crate::path::GenericArgs,
- crate::attr::AttrInput,
- GenericParams,
- str,
-);
+impl_internable!(str,);