Skip to content

Commit 657a925

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 f21a01f commit 657a925

File tree

4 files changed

+34
-31
lines changed

4 files changed

+34
-31
lines changed

src/tools/rust-analyzer/Cargo.lock

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ dependencies = [
7373
"intern",
7474
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
7575
"lz4_flex",
76-
"rustc-hash",
76+
"rustc-hash 2.0.0",
7777
"salsa",
7878
"semver",
7979
"span",
@@ -161,7 +161,7 @@ dependencies = [
161161
"expect-test",
162162
"intern",
163163
"oorandom",
164-
"rustc-hash",
164+
"rustc-hash 2.0.0",
165165
"syntax",
166166
"syntax-bridge",
167167
"tt",
@@ -216,7 +216,7 @@ dependencies = [
216216
"chalk-derive",
217217
"chalk-ir",
218218
"chalk-solve",
219-
"rustc-hash",
219+
"rustc-hash 1.1.0",
220220
"tracing",
221221
]
222222

@@ -232,7 +232,7 @@ dependencies = [
232232
"indexmap",
233233
"itertools",
234234
"petgraph",
235-
"rustc-hash",
235+
"rustc-hash 1.1.0",
236236
"tracing",
237237
]
238238

@@ -513,7 +513,7 @@ dependencies = [
513513
"hir-ty",
514514
"intern",
515515
"itertools",
516-
"rustc-hash",
516+
"rustc-hash 2.0.0",
517517
"smallvec",
518518
"span",
519519
"stdx",
@@ -547,7 +547,7 @@ dependencies = [
547547
"mbe",
548548
"ra-ap-rustc_abi",
549549
"ra-ap-rustc_parse_format",
550-
"rustc-hash",
550+
"rustc-hash 2.0.0",
551551
"rustc_apfloat",
552552
"smallvec",
553553
"span",
@@ -577,7 +577,7 @@ dependencies = [
577577
"limit",
578578
"mbe",
579579
"parser",
580-
"rustc-hash",
580+
"rustc-hash 2.0.0",
581581
"smallvec",
582582
"span",
583583
"stdx",
@@ -616,7 +616,7 @@ dependencies = [
616616
"ra-ap-rustc_abi",
617617
"ra-ap-rustc_index",
618618
"ra-ap-rustc_pattern_analysis",
619-
"rustc-hash",
619+
"rustc-hash 2.0.0",
620620
"rustc_apfloat",
621621
"scoped-tls",
622622
"smallvec",
@@ -737,7 +737,7 @@ dependencies = [
737737
"parser",
738738
"profile",
739739
"rayon",
740-
"rustc-hash",
740+
"rustc-hash 2.0.0",
741741
"span",
742742
"stdx",
743743
"syntax",
@@ -834,7 +834,7 @@ version = "0.0.0"
834834
dependencies = [
835835
"dashmap",
836836
"hashbrown",
837-
"rustc-hash",
837+
"rustc-hash 2.0.0",
838838
"sptr",
839839
"triomphe",
840840
]
@@ -1051,7 +1051,7 @@ dependencies = [
10511051
"intern",
10521052
"parser",
10531053
"ra-ap-rustc_lexer",
1054-
"rustc-hash",
1054+
"rustc-hash 2.0.0",
10551055
"smallvec",
10561056
"span",
10571057
"stdx",
@@ -1345,7 +1345,7 @@ dependencies = [
13451345
"indexmap",
13461346
"intern",
13471347
"paths",
1348-
"rustc-hash",
1348+
"rustc-hash 2.0.0",
13491349
"serde",
13501350
"serde_json",
13511351
"span",
@@ -1435,7 +1435,7 @@ dependencies = [
14351435
"itertools",
14361436
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
14371437
"paths",
1438-
"rustc-hash",
1438+
"rustc-hash 2.0.0",
14391439
"semver",
14401440
"serde",
14411441
"serde_json",
@@ -1555,7 +1555,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
15551555
checksum = "273d5f72926a58c7eea27aebc898d1d5b32d23d2342f692a94a2cf8746aa4a2f"
15561556
dependencies = [
15571557
"ra-ap-rustc_index",
1558-
"rustc-hash",
1558+
"rustc-hash 1.1.0",
15591559
"rustc_apfloat",
15601560
"smallvec",
15611561
"tracing",
@@ -1640,7 +1640,7 @@ dependencies = [
16401640
"countme",
16411641
"hashbrown",
16421642
"memoffset",
1643-
"rustc-hash",
1643+
"rustc-hash 1.1.0",
16441644
"text-size",
16451645
]
16461646

@@ -1680,7 +1680,7 @@ dependencies = [
16801680
"profile",
16811681
"project-model",
16821682
"rayon",
1683-
"rustc-hash",
1683+
"rustc-hash 2.0.0",
16841684
"scip",
16851685
"semver",
16861686
"serde",
@@ -1717,6 +1717,12 @@ version = "1.1.0"
17171717
source = "registry+https://github.com/rust-lang/crates.io-index"
17181718
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
17191719

1720+
[[package]]
1721+
name = "rustc-hash"
1722+
version = "2.0.0"
1723+
source = "registry+https://github.com/rust-lang/crates.io-index"
1724+
checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
1725+
17201726
[[package]]
17211727
name = "rustc_apfloat"
17221728
version = "0.2.1+llvm-462a31f5a5ab"
@@ -1746,7 +1752,7 @@ dependencies = [
17461752
"oorandom",
17471753
"parking_lot",
17481754
"rand",
1749-
"rustc-hash",
1755+
"rustc-hash 2.0.0",
17501756
"salsa-macros",
17511757
"smallvec",
17521758
"tracing",
@@ -1898,7 +1904,7 @@ version = "0.0.0"
18981904
dependencies = [
18991905
"hashbrown",
19001906
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
1901-
"rustc-hash",
1907+
"rustc-hash 2.0.0",
19021908
"salsa",
19031909
"stdx",
19041910
"syntax",
@@ -1967,7 +1973,7 @@ dependencies = [
19671973
"ra-ap-rustc_lexer",
19681974
"rayon",
19691975
"rowan",
1970-
"rustc-hash",
1976+
"rustc-hash 2.0.0",
19711977
"rustc_apfloat",
19721978
"smol_str",
19731979
"stdx",
@@ -1983,7 +1989,7 @@ version = "0.0.0"
19831989
dependencies = [
19841990
"intern",
19851991
"parser",
1986-
"rustc-hash",
1992+
"rustc-hash 2.0.0",
19871993
"span",
19881994
"stdx",
19891995
"syntax",
@@ -2000,7 +2006,7 @@ dependencies = [
20002006
"cfg",
20012007
"hir-expand",
20022008
"intern",
2003-
"rustc-hash",
2009+
"rustc-hash 2.0.0",
20042010
"span",
20052011
"stdx",
20062012
"test-utils",
@@ -2014,7 +2020,7 @@ dependencies = [
20142020
"dissimilar",
20152021
"paths",
20162022
"profile",
2017-
"rustc-hash",
2023+
"rustc-hash 2.0.0",
20182024
"stdx",
20192025
"text-size",
20202026
"tracing",
@@ -2361,7 +2367,7 @@ dependencies = [
23612367
"indexmap",
23622368
"nohash-hasher",
23632369
"paths",
2364-
"rustc-hash",
2370+
"rustc-hash 2.0.0",
23652371
"stdx",
23662372
"tracing",
23672373
]
@@ -2374,7 +2380,7 @@ dependencies = [
23742380
"notify",
23752381
"paths",
23762382
"rayon",
2377-
"rustc-hash",
2383+
"rustc-hash 2.0.0",
23782384
"stdx",
23792385
"tracing",
23802386
"vfs",

src/tools/rust-analyzer/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"

src/tools/rust-analyzer/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
}),

src/tools/rust-analyzer/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)