diff --git a/Cargo.lock b/Cargo.lock index 7c76ea98c0..ae7d19fccb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -317,7 +317,7 @@ dependencies = [ "boa_macros", "indexmap", "num-bigint", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "serde", ] @@ -390,7 +390,7 @@ dependencies = [ "portable-atomic", "rand", "regress", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "ryu-js", "serde", "serde_json", @@ -460,7 +460,7 @@ dependencies = [ "indexmap", "once_cell", "phf", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "serde", "static_assertions", ] @@ -472,7 +472,7 @@ dependencies = [ "boa_engine", "boa_gc", "boa_macros", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", ] [[package]] @@ -507,7 +507,7 @@ dependencies = [ "num-bigint", "num-traits", "regress", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", ] [[package]] @@ -516,7 +516,7 @@ version = "0.18.0" dependencies = [ "measureme", "once_cell", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", ] [[package]] @@ -526,7 +526,7 @@ dependencies = [ "boa_engine", "boa_gc", "indoc", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "textwrap", ] @@ -537,7 +537,7 @@ dependencies = [ "boa_macros", "fast-float", "paste", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "sptr", "static_assertions", ] @@ -557,7 +557,7 @@ dependencies = [ "comfy-table", "phf", "rayon", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "serde", "serde_json", "serde_repr", diff --git a/Cargo.toml b/Cargo.toml index a83ae29d20..2a8478a18d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,8 +65,8 @@ once_cell = { version = "1.19.0", default-features = false } phf = { version = "0.11.2", default-features = false } pollster = "0.3.0" regex = "1.10.5" -regress = { version="0.10.0", features = ["utf16"]} -rustc-hash = { version = "1.1.0", default-features = false } +regress = { version = "0.10.0", features = ["utf16"] } +rustc-hash = { version = "2.0.0", default-features = false } serde_json = "1.0.119" serde = "1.0.203" static_assertions = "1.1.0" diff --git a/core/profiler/Cargo.toml b/core/profiler/Cargo.toml index 4f94ca8c05..77120b4791 100644 --- a/core/profiler/Cargo.toml +++ b/core/profiler/Cargo.toml @@ -16,7 +16,7 @@ profiler = ["dep:measureme", "dep:once_cell", "dep:rustc-hash"] [dependencies] measureme = { workspace = true, optional = true } once_cell = { workspace = true, optional = true, features = ["std"] } -rustc-hash = { workspace = true, optional = true } +rustc-hash = { workspace = true, optional = true, features = ["std"] } [lints] workspace = true diff --git a/core/string/src/common.rs b/core/string/src/common.rs index 8b420f7c68..080a071e25 100644 --- a/core/string/src/common.rs +++ b/core/string/src/common.rs @@ -4,8 +4,8 @@ use crate::{tagged::Tagged, JsStr}; use super::JsString; use paste::paste; -use rustc_hash::{FxHashMap, FxHasher}; -use std::hash::BuildHasherDefault; +use rustc_hash::{FxBuildHasher, FxHashMap}; +use std::collections::HashMap; macro_rules! well_known_statics { ( $( $(#[$attr:meta])* ($name:ident, $string:literal) ),+$(,)? ) => { @@ -216,9 +216,9 @@ const MAX_STATIC_LENGTH: usize = { thread_local! { /// Map from a string inside [`RAW_STATICS`] to its corresponding static index on `RAW_STATICS`. static RAW_STATICS_CACHE: FxHashMap, usize> = { - let mut constants = FxHashMap::with_capacity_and_hasher( + let mut constants = HashMap::with_capacity_and_hasher( RAW_STATICS.len(), - BuildHasherDefault::::default(), + FxBuildHasher ); for (idx, &s) in RAW_STATICS.iter().enumerate() {