Skip to content

Commit adebe09

Browse files
committed
Update to v0.2 of rustc-stable-hash
1 parent e08b80c commit adebe09

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
@@ -275,6 +275,15 @@ version = "2.5.0"
275275
source = "registry+https://github.com/rust-lang/crates.io-index"
276276
checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"
277277

278+
[[package]]
279+
name = "blake2"
280+
version = "0.10.6"
281+
source = "registry+https://github.com/rust-lang/crates.io-index"
282+
checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"
283+
dependencies = [
284+
"digest",
285+
]
286+
278287
[[package]]
279288
name = "block-buffer"
280289
version = "0.10.4"
@@ -1017,6 +1026,7 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
10171026
dependencies = [
10181027
"block-buffer",
10191028
"crypto-common",
1029+
"subtle",
10201030
]
10211031

10221032
[[package]]
@@ -3227,8 +3237,10 @@ checksum = "5be1bdc7edf596692617627bbfeaba522131b18e06ca4df2b6b689e3c5d5ce84"
32273237
[[package]]
32283238
name = "rustc-stable-hash"
32293239
version = "0.1.0"
3230-
source = "registry+https://github.com/rust-lang/crates.io-index"
3231-
checksum = "e5c9f15eec8235d7cb775ee6f81891db79b98fd54ba1ad8fae565b88ef1ae4e2"
3240+
source = "git+https://github.com/Urgau/rustc-stable-hash.git?rev=543696a#543696a0b6299c4cc8a8c9c30651e5cc0056655a"
3241+
dependencies = [
3242+
"blake2",
3243+
]
32323244

32333245
[[package]]
32343246
name = "rustc_abi"
@@ -5067,6 +5079,12 @@ dependencies = [
50675079
"syn 1.0.109",
50685080
]
50695081

5082+
[[package]]
5083+
name = "subtle"
5084+
version = "2.6.1"
5085+
source = "registry+https://github.com/rust-lang/crates.io-index"
5086+
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
5087+
50705088
[[package]]
50715089
name = "suggest-tests"
50725090
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
@@ -258,6 +259,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
258259
"arrayvec",
259260
"autocfg",
260261
"bitflags",
262+
"blake2",
261263
"block-buffer",
262264
"byteorder", // via ruzstd in object in thorin-dwp
263265
"cc",
@@ -393,6 +395,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
393395
"stacker",
394396
"static_assertions",
395397
"strsim",
398+
"subtle",
396399
"syn",
397400
"synstructure",
398401
"tempfile",

0 commit comments

Comments
 (0)