Skip to content

Commit c6bd7fe

Browse files
author
Jonathan Turner
authored
Rollup merge of #37579 - liigo:defaulthasher, r=alexcrichton
reference full path DefaultHasher Since `DefaultHasher` does not in scope, it's not obvious where to find it.
2 parents 12f814e + a5f6aa1 commit c6bd7fe

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

src/libcore/hash/sip.rs

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ use mem;
2424
///
2525
/// See: https://131002.net/siphash/
2626
#[unstable(feature = "sip_hash_13", issue = "34767")]
27-
#[rustc_deprecated(since = "1.13.0", reason = "use `DefaultHasher` instead")]
27+
#[rustc_deprecated(since = "1.13.0",
28+
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
2829
#[derive(Debug, Clone, Default)]
2930
pub struct SipHasher13 {
3031
hasher: Hasher<Sip13Rounds>,
@@ -34,7 +35,8 @@ pub struct SipHasher13 {
3435
///
3536
/// See: https://131002.net/siphash/
3637
#[unstable(feature = "sip_hash_13", issue = "34767")]
37-
#[rustc_deprecated(since = "1.13.0", reason = "use `DefaultHasher` instead")]
38+
#[rustc_deprecated(since = "1.13.0",
39+
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
3840
#[derive(Debug, Clone, Default)]
3941
pub struct SipHasher24 {
4042
hasher: Hasher<Sip24Rounds>,
@@ -53,7 +55,8 @@ pub struct SipHasher24 {
5355
/// it is not intended for cryptographic purposes. As such, all
5456
/// cryptographic uses of this implementation are _strongly discouraged_.
5557
#[stable(feature = "rust1", since = "1.0.0")]
56-
#[rustc_deprecated(since = "1.13.0", reason = "use `DefaultHasher` instead")]
58+
#[rustc_deprecated(since = "1.13.0",
59+
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
5760
#[derive(Debug, Clone, Default)]
5861
pub struct SipHasher(SipHasher24);
5962

@@ -140,15 +143,17 @@ impl SipHasher {
140143
/// Creates a new `SipHasher` with the two initial keys set to 0.
141144
#[inline]
142145
#[stable(feature = "rust1", since = "1.0.0")]
143-
#[rustc_deprecated(since = "1.13.0", reason = "use `DefaultHasher` instead")]
146+
#[rustc_deprecated(since = "1.13.0",
147+
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
144148
pub fn new() -> SipHasher {
145149
SipHasher::new_with_keys(0, 0)
146150
}
147151

148152
/// Creates a `SipHasher` that is keyed off the provided keys.
149153
#[inline]
150154
#[stable(feature = "rust1", since = "1.0.0")]
151-
#[rustc_deprecated(since = "1.13.0", reason = "use `DefaultHasher` instead")]
155+
#[rustc_deprecated(since = "1.13.0",
156+
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
152157
pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher {
153158
SipHasher(SipHasher24::new_with_keys(key0, key1))
154159
}
@@ -158,15 +163,17 @@ impl SipHasher13 {
158163
/// Creates a new `SipHasher13` with the two initial keys set to 0.
159164
#[inline]
160165
#[unstable(feature = "sip_hash_13", issue = "34767")]
161-
#[rustc_deprecated(since = "1.13.0", reason = "use `DefaultHasher` instead")]
166+
#[rustc_deprecated(since = "1.13.0",
167+
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
162168
pub fn new() -> SipHasher13 {
163169
SipHasher13::new_with_keys(0, 0)
164170
}
165171

166172
/// Creates a `SipHasher13` that is keyed off the provided keys.
167173
#[inline]
168174
#[unstable(feature = "sip_hash_13", issue = "34767")]
169-
#[rustc_deprecated(since = "1.13.0", reason = "use `DefaultHasher` instead")]
175+
#[rustc_deprecated(since = "1.13.0",
176+
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
170177
pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher13 {
171178
SipHasher13 {
172179
hasher: Hasher::new_with_keys(key0, key1)
@@ -178,15 +185,17 @@ impl SipHasher24 {
178185
/// Creates a new `SipHasher24` with the two initial keys set to 0.
179186
#[inline]
180187
#[unstable(feature = "sip_hash_13", issue = "34767")]
181-
#[rustc_deprecated(since = "1.13.0", reason = "use `DefaultHasher` instead")]
188+
#[rustc_deprecated(since = "1.13.0",
189+
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
182190
pub fn new() -> SipHasher24 {
183191
SipHasher24::new_with_keys(0, 0)
184192
}
185193

186194
/// Creates a `SipHasher24` that is keyed off the provided keys.
187195
#[inline]
188196
#[unstable(feature = "sip_hash_13", issue = "34767")]
189-
#[rustc_deprecated(since = "1.13.0", reason = "use `DefaultHasher` instead")]
197+
#[rustc_deprecated(since = "1.13.0",
198+
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
190199
pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher24 {
191200
SipHasher24 {
192201
hasher: Hasher::new_with_keys(key0, key1)

0 commit comments

Comments
 (0)