summaryrefslogtreecommitdiffstats
path: root/src/tools/rust-analyzer/crates/intern
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rust-analyzer/crates/intern')
-rw-r--r--src/tools/rust-analyzer/crates/intern/Cargo.toml1
-rw-r--r--src/tools/rust-analyzer/crates/intern/src/lib.rs6
2 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/rust-analyzer/crates/intern/Cargo.toml b/src/tools/rust-analyzer/crates/intern/Cargo.toml
index 4d56c7719..89b302c79 100644
--- a/src/tools/rust-analyzer/crates/intern/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/intern/Cargo.toml
@@ -16,6 +16,5 @@ doctest = false
# We need to freeze the version of the crate, as the raw-api feature is considered unstable
dashmap = { version = "=5.4.0", features = ["raw-api"] }
hashbrown.workspace = true
-once_cell = "1.17.0"
rustc-hash = "1.1.0"
triomphe.workspace = true
diff --git a/src/tools/rust-analyzer/crates/intern/src/lib.rs b/src/tools/rust-analyzer/crates/intern/src/lib.rs
index dabbf3a38..2934d2667 100644
--- a/src/tools/rust-analyzer/crates/intern/src/lib.rs
+++ b/src/tools/rust-analyzer/crates/intern/src/lib.rs
@@ -6,11 +6,11 @@ use std::{
fmt::{self, Debug, Display},
hash::{BuildHasherDefault, Hash, Hasher},
ops::Deref,
+ sync::OnceLock,
};
use dashmap::{DashMap, SharedValue};
use hashbrown::{hash_map::RawEntryMut, HashMap};
-use once_cell::sync::OnceCell;
use rustc_hash::FxHasher;
use triomphe::Arc;
@@ -177,12 +177,12 @@ impl<T: Display + Internable + ?Sized> Display for Interned<T> {
}
pub struct InternStorage<T: ?Sized> {
- map: OnceCell<InternMap<T>>,
+ map: OnceLock<InternMap<T>>,
}
impl<T: ?Sized> InternStorage<T> {
pub const fn new() -> Self {
- Self { map: OnceCell::new() }
+ Self { map: OnceLock::new() }
}
}