Skip to content

Commit f3c36ce

Browse files
committed
[EXPERIMENT] Test 8-bit tags for hashbrown
See rust-lang/hashbrown#653
1 parent ce4beeb commit f3c36ce

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

library/Cargo.lock

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ dependencies = [
8888
"windows-sys",
8989
]
9090

91+
[[package]]
92+
name = "foldhash"
93+
version = "0.2.0"
94+
source = "registry+https://github.com/rust-lang/crates.io-index"
95+
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
96+
9197
[[package]]
9298
name = "fortanix-sgx-abi"
9399
version = "0.6.1"
@@ -119,10 +125,10 @@ dependencies = [
119125

120126
[[package]]
121127
name = "hashbrown"
122-
version = "0.15.5"
123-
source = "registry+https://github.com/rust-lang/crates.io-index"
124-
checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
128+
version = "0.16.0"
129+
source = "git+https://github.com/gaujay/hashbrown.git?branch=8-bits-tag#fcce069967e957305ec8098c5f1e8280e9ce7c5b"
125130
dependencies = [
131+
"foldhash",
126132
"rustc-std-workspace-alloc",
127133
"rustc-std-workspace-core",
128134
]

library/std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ panic_unwind = { path = "../panic_unwind", optional = true }
2020
panic_abort = { path = "../panic_abort" }
2121
core = { path = "../core", public = true }
2222
unwind = { path = "../unwind" }
23-
hashbrown = { version = "0.15", default-features = false, features = [
23+
hashbrown = { git = "https://github.com/gaujay/hashbrown.git", branch = "8-bits-tag", default-features = false, features = [
2424
'rustc-dep-of-std',
2525
] }
2626
std_detect = { path = "../std_detect", public = true }

library/std/src/collections/hash/map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ where
10511051
K: Borrow<Q>,
10521052
Q: Hash + Eq,
10531053
{
1054-
self.base.get_many_mut(ks)
1054+
self.base.get_disjoint_mut(ks)
10551055
}
10561056

10571057
/// Attempts to get mutable references to `N` values in the map at once, without validating that
@@ -1118,7 +1118,7 @@ where
11181118
K: Borrow<Q>,
11191119
Q: Hash + Eq,
11201120
{
1121-
unsafe { self.base.get_many_unchecked_mut(ks) }
1121+
unsafe { self.base.get_disjoint_unchecked_mut(ks) }
11221122
}
11231123

11241124
/// Returns `true` if the map contains a value for the specified key.

src/tools/tidy/src/deps.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const LICENSES: &[&str] = &[
4545
"Unlicense OR MIT",
4646
"Unlicense/MIT",
4747
"Zlib OR Apache-2.0 OR MIT", // tinyvec
48+
"Zlib",
4849
// tidy-alphabetical-end
4950
];
5051

@@ -559,6 +560,7 @@ const PERMITTED_STDLIB_DEPENDENCIES: &[&str] = &[
559560
"cfg-if",
560561
"compiler_builtins",
561562
"dlmalloc",
563+
"foldhash",
562564
"fortanix-sgx-abi",
563565
"getopts",
564566
"gimli",

src/tools/tidy/src/extdeps.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const ALLOWED_SOURCES: &[&str] = &[
1111
r#""registry+https://github.com/rust-lang/crates.io-index""#,
1212
// This is `rust_team_data` used by `site` in src/tools/rustc-perf,
1313
r#""git+https://github.com/rust-lang/team#a5260e76d3aa894c64c56e6ddc8545b9a98043ec""#,
14+
r#""git+https://github.com/gaujay/hashbrown.git?branch=8-bits-tag#fcce069967e957305ec8098c5f1e8280e9ce7c5b""#,
1415
];
1516

1617
/// Checks for external package sources. `root` is the path to the directory that contains the

0 commit comments

Comments
 (0)