diff --git a/crates/oxc_semantic/src/scope.rs b/crates/oxc_semantic/src/scope.rs index 612e6c93150fc..5c364f2fd4f6b 100644 --- a/crates/oxc_semantic/src/scope.rs +++ b/crates/oxc_semantic/src/scope.rs @@ -1,7 +1,7 @@ -use std::{hash::BuildHasherDefault, mem}; +use std::mem; use indexmap::IndexMap; -use rustc_hash::{FxHashMap, FxHasher}; +use rustc_hash::{FxBuildHasher, FxHashMap}; use oxc_index::IndexVec; use oxc_span::CompactStr; @@ -10,7 +10,7 @@ pub use oxc_syntax::scope::{ScopeFlags, ScopeId}; use crate::{symbol::SymbolId, NodeId}; -type FxIndexMap = IndexMap>; +type FxIndexMap = IndexMap; pub(crate) type Bindings = FxIndexMap; pub type UnresolvedReferences = FxHashMap>; diff --git a/crates/oxc_transformer/src/common/arrow_function_converter.rs b/crates/oxc_transformer/src/common/arrow_function_converter.rs index d8b181ede4555..b2fb0085115f1 100644 --- a/crates/oxc_transformer/src/common/arrow_function_converter.rs +++ b/crates/oxc_transformer/src/common/arrow_function_converter.rs @@ -87,11 +87,9 @@ //! The Implementation based on //! -use std::hash::BuildHasherDefault; - use compact_str::CompactString; use indexmap::IndexMap; -use rustc_hash::{FxHashSet, FxHasher}; +use rustc_hash::{FxBuildHasher, FxHashSet}; use oxc_allocator::{Box as ArenaBox, Vec as ArenaVec}; use oxc_ast::{ast::*, NONE}; @@ -106,7 +104,7 @@ use oxc_traverse::{Ancestor, BoundIdentifier, Traverse, TraverseCtx}; use crate::EnvOptions; -type FxIndexMap = IndexMap>; +type FxIndexMap = IndexMap; /// Mode for arrow function conversion #[derive(Debug, Clone, Copy, PartialEq, Eq)] diff --git a/crates/oxc_transformer/src/es2022/class_properties/mod.rs b/crates/oxc_transformer/src/es2022/class_properties/mod.rs index 7de6fe88946ab..f9e5f7dfca1a3 100644 --- a/crates/oxc_transformer/src/es2022/class_properties/mod.rs +++ b/crates/oxc_transformer/src/es2022/class_properties/mod.rs @@ -139,10 +139,8 @@ //! * //! * Class properties TC39 proposal: -use std::hash::BuildHasherDefault; - use indexmap::IndexMap; -use rustc_hash::FxHasher; +use rustc_hash::FxBuildHasher; use serde::Deserialize; use oxc_allocator::{Address, GetAddress}; @@ -158,7 +156,7 @@ mod private; mod static_prop; mod utils; -type FxIndexMap = IndexMap>; +type FxIndexMap = IndexMap; #[derive(Debug, Default, Clone, Copy, Deserialize)] #[serde(default, rename_all = "camelCase")] diff --git a/tasks/transform_checker/src/lib.rs b/tasks/transform_checker/src/lib.rs index bda78937394ac..88107f24385a0 100644 --- a/tasks/transform_checker/src/lib.rs +++ b/tasks/transform_checker/src/lib.rs @@ -88,11 +88,11 @@ use std::{ cell::Cell, fmt::{Debug, Display}, - hash::{BuildHasherDefault, Hash}, + hash::Hash, }; use indexmap::IndexMap; -use rustc_hash::FxHasher; +use rustc_hash::FxBuildHasher; use oxc_allocator::{Allocator, CloneIn}; use oxc_ast::{ast::*, visit::walk, Visit}; @@ -105,7 +105,7 @@ use oxc_syntax::{ symbol::SymbolId, }; -type FxIndexMap = IndexMap>; +type FxIndexMap = IndexMap; /// Check `ScopeTree` and `SymbolTable` are correct after transform pub fn check_semantic_after_transform(