diff --git a/crates/oxc_allocator/src/hash_map.rs b/crates/oxc_allocator/src/hash_map.rs index acc5ce8bf..094284968 100644 --- a/crates/oxc_allocator/src/hash_map.rs +++ b/crates/oxc_allocator/src/hash_map.rs @@ -50,6 +50,11 @@ type FxHashMap<'alloc, K, V> = hashbrown::HashMap(ManuallyDrop>); +/// SAFETY: Not actually safe, but for enabling `Send` for downstream crates. +unsafe impl Send for HashMap<'_, K, V> {} +/// SAFETY: Not actually safe, but for enabling `Sync` for downstream crates. +unsafe impl Sync for HashMap<'_, K, V> {} + // TODO: `IntoIter`, `Drain`, and other consuming iterators provided by `hashbrown` are `Drop`. // Wrap them in `ManuallyDrop` to prevent that.