Skip to content

Commit 6a2b827

Browse files
NoratriebVeykril
authored andcommitted
Update rustc-hash to version 2
This brings in the new optimized algorithm that was shown to have small performance benefits for rustc.
1 parent 9323b53 commit 6a2b827

File tree

4 files changed

+34
-31
lines changed

4 files changed

+34
-31
lines changed

Cargo.lock

Lines changed: 30 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ process-wrap = { version = "8.0.2", features = ["std"] }
136136
pulldown-cmark-to-cmark = "10.0.4"
137137
pulldown-cmark = { version = "0.9.0", default-features = false }
138138
rayon = "1.8.0"
139-
rustc-hash = "1.1.0"
139+
rustc-hash = "2.0.0"
140140
semver = "1.0.14"
141141
serde = { version = "1.0.192", features = ["derive"] }
142142
serde_json = "1.0.108"

crates/hir-ty/src/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ mod test_db;
5151
#[cfg(test)]
5252
mod tests;
5353

54-
use std::{
55-
collections::hash_map::Entry,
56-
hash::{BuildHasherDefault, Hash},
57-
};
54+
use std::{collections::hash_map::Entry, hash::Hash};
5855

5956
use base_db::ra_salsa::InternValueTrivial;
6057
use chalk_ir::{
@@ -245,7 +242,7 @@ impl MemoryMap {
245242
match self {
246243
MemoryMap::Empty => Ok(Default::default()),
247244
MemoryMap::Simple(m) => transform((&0, m)).map(|(addr, val)| {
248-
let mut map = FxHashMap::with_capacity_and_hasher(1, BuildHasherDefault::default());
245+
let mut map = FxHashMap::with_capacity_and_hasher(1, rustc_hash::FxBuildHasher);
249246
map.insert(addr, val);
250247
map
251248
}),

crates/ra-salsa/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ indexmap = "2.1.0"
1717
lock_api = "0.4"
1818
tracing = "0.1"
1919
parking_lot = "0.12.1"
20-
rustc-hash = "1.0"
20+
rustc-hash = "2.0.0"
2121
smallvec = "1.0.0"
2222
oorandom = "11"
2323
triomphe = "0.1.11"

0 commit comments

Comments
 (0)