Skip to content

Commit 4bd7fdc

Browse files
committed
Update to v0.2 of rustc-stable-hash
1 parent 4db3d12 commit 4bd7fdc

File tree

5 files changed

+30
-15
lines changed

5 files changed

+30
-15
lines changed

Cargo.lock

+20-2
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,15 @@ version = "2.5.0"
301301
source = "registry+https://github.com/rust-lang/crates.io-index"
302302
checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"
303303

304+
[[package]]
305+
name = "blake2"
306+
version = "0.10.6"
307+
source = "registry+https://github.com/rust-lang/crates.io-index"
308+
checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"
309+
dependencies = [
310+
"digest",
311+
]
312+
304313
[[package]]
305314
name = "block-buffer"
306315
version = "0.10.4"
@@ -1064,6 +1073,7 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
10641073
dependencies = [
10651074
"block-buffer",
10661075
"crypto-common",
1076+
"subtle",
10671077
]
10681078

10691079
[[package]]
@@ -3422,8 +3432,10 @@ checksum = "5be1bdc7edf596692617627bbfeaba522131b18e06ca4df2b6b689e3c5d5ce84"
34223432
[[package]]
34233433
name = "rustc-stable-hash"
34243434
version = "0.1.0"
3425-
source = "registry+https://github.com/rust-lang/crates.io-index"
3426-
checksum = "e5c9f15eec8235d7cb775ee6f81891db79b98fd54ba1ad8fae565b88ef1ae4e2"
3435+
source = "git+https://github.com/Urgau/rustc-stable-hash.git?rev=543696a#543696a0b6299c4cc8a8c9c30651e5cc0056655a"
3436+
dependencies = [
3437+
"blake2",
3438+
]
34273439

34283440
[[package]]
34293441
name = "rustc-std-workspace-alloc"
@@ -5321,6 +5333,12 @@ dependencies = [
53215333
"syn 1.0.109",
53225334
]
53235335

5336+
[[package]]
5337+
name = "subtle"
5338+
version = "2.6.1"
5339+
source = "registry+https://github.com/rust-lang/crates.io-index"
5340+
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
5341+
53245342
[[package]]
53255343
name = "suggest-tests"
53265344
version = "0.1.0"

compiler/rustc_data_structures/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobserver_crate = { version = "0.1.28", package = "jobserver" }
1515
measureme = "11"
1616
rustc-hash = "1.1.0"
1717
rustc-rayon = { version = "0.5.0", optional = true }
18-
rustc-stable-hash = { version = "0.1.0", features = ["nightly"] }
18+
rustc-stable-hash = { git = "https://github.com/Urgau/rustc-stable-hash.git", rev = "543696a", features = ["nightly"] }
1919
rustc_arena = { path = "../rustc_arena" }
2020
rustc_graphviz = { path = "../rustc_graphviz" }
2121
rustc_index = { path = "../rustc_index", package = "rustc_index" }

compiler/rustc_data_structures/src/fingerprint.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,9 @@ impl FingerprintHasher for crate::unhash::Unhasher {
157157
}
158158
}
159159

160-
impl FromStableHash for Fingerprint {
161-
type Hash = StableHasherHash;
162-
160+
impl FromStableHash<StableHasherHash> for Fingerprint {
163161
#[inline]
164-
fn from(StableHasherHash([_0, _1]): Self::Hash) -> Self {
162+
fn from(StableHasherHash([_0, _1]): StableHasherHash) -> Self {
165163
Fingerprint(_0, _1)
166164
}
167165
}

compiler/rustc_data_structures/src/hashes.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,9 @@ impl<D: Decoder> Decodable<D> for Hash64 {
5858
}
5959
}
6060

61-
impl FromStableHash for Hash64 {
62-
type Hash = StableHasherHash;
63-
61+
impl FromStableHash<StableHasherHash> for Hash64 {
6462
#[inline]
65-
fn from(StableHasherHash([_0, __1]): Self::Hash) -> Self {
63+
fn from(StableHasherHash([_0, __1]): StableHasherHash) -> Self {
6664
Self { inner: _0 }
6765
}
6866
}
@@ -125,11 +123,9 @@ impl<D: Decoder> Decodable<D> for Hash128 {
125123
}
126124
}
127125

128-
impl FromStableHash for Hash128 {
129-
type Hash = StableHasherHash;
130-
126+
impl FromStableHash<StableHasherHash> for Hash128 {
131127
#[inline]
132-
fn from(StableHasherHash([_0, _1]): Self::Hash) -> Self {
128+
fn from(StableHasherHash([_0, _1]): StableHasherHash) -> Self {
133129
Self { inner: u128::from(_0) | (u128::from(_1) << 64) }
134130
}
135131
}

src/tools/tidy/src/deps.rs

+3
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ const EXCEPTIONS: ExceptionList = &[
9898
("ryu", "Apache-2.0 OR BSL-1.0"), // BSL is not acceptble, but we use it under Apache-2.0 // cargo/... (because of serde)
9999
("self_cell", "Apache-2.0"), // rustc (fluent translations)
100100
("snap", "BSD-3-Clause"), // rustc
101+
("subtle", "BSD-3-Clause"), // rustc
101102
("wasm-encoder", "Apache-2.0 WITH LLVM-exception"), // rustc
102103
("wasm-metadata", "Apache-2.0 WITH LLVM-exception"), // rustc
103104
("wasmparser", "Apache-2.0 WITH LLVM-exception"), // rustc
@@ -251,6 +252,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
251252
"arrayvec",
252253
"autocfg",
253254
"bitflags",
255+
"blake2",
254256
"block-buffer",
255257
"byteorder", // via ruzstd in object in thorin-dwp
256258
"cc",
@@ -392,6 +394,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
392394
"stacker",
393395
"static_assertions",
394396
"strsim",
397+
"subtle",
395398
"syn",
396399
"synstructure",
397400
"tempfile",

0 commit comments

Comments
 (0)