Skip to content

Commit 89ecb0d

Browse files
committed
Mark deprecated unstable SipHasher13 as a doc-hidden impl detail of HashMap.
It stays in libcore rather than being private in HashMap’s module because it shares code with the deprecated *stable* `SipHasher` type.
1 parent c5f020a commit 89ecb0d

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

src/libcore/hash/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@ use mem;
9999
#[allow(deprecated)]
100100
pub use self::sip::SipHasher;
101101

102-
#[unstable(feature = "sip_hash_13", issue = "34767")]
102+
#[unstable(feature = "hashmap_internals", issue = "0")]
103103
#[allow(deprecated)]
104+
#[doc(hidden)]
104105
pub use self::sip::SipHasher13;
105106

106107
mod sip;

src/libcore/hash/sip.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,19 @@ use mem;
2323
/// (eg. `collections::HashMap` uses it by default).
2424
///
2525
/// See: <https://131002.net/siphash>
26-
#[unstable(feature = "sip_hash_13", issue = "34767")]
26+
#[unstable(feature = "hashmap_internals", issue = "0")]
2727
#[rustc_deprecated(since = "1.13.0",
2828
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
2929
#[derive(Debug, Clone, Default)]
30+
#[doc(hidden)]
3031
pub struct SipHasher13 {
3132
hasher: Hasher<Sip13Rounds>,
3233
}
3334

3435
/// An implementation of SipHash 2-4.
3536
///
3637
/// See: <https://131002.net/siphash/>
37-
#[unstable(feature = "sip_hash_13", issue = "34767")]
38+
#[unstable(feature = "hashmap_internals", issue = "0")]
3839
#[rustc_deprecated(since = "1.13.0",
3940
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
4041
#[derive(Debug, Clone, Default)]
@@ -165,7 +166,7 @@ impl SipHasher {
165166
impl SipHasher13 {
166167
/// Creates a new `SipHasher13` with the two initial keys set to 0.
167168
#[inline]
168-
#[unstable(feature = "sip_hash_13", issue = "34767")]
169+
#[unstable(feature = "hashmap_internals", issue = "0")]
169170
#[rustc_deprecated(since = "1.13.0",
170171
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
171172
pub fn new() -> SipHasher13 {
@@ -174,7 +175,7 @@ impl SipHasher13 {
174175

175176
/// Creates a `SipHasher13` that is keyed off the provided keys.
176177
#[inline]
177-
#[unstable(feature = "sip_hash_13", issue = "34767")]
178+
#[unstable(feature = "hashmap_internals", issue = "0")]
178179
#[rustc_deprecated(since = "1.13.0",
179180
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
180181
pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher13 {
@@ -260,7 +261,7 @@ impl super::Hasher for SipHasher {
260261
}
261262
}
262263

263-
#[unstable(feature = "sip_hash_13", issue = "34767")]
264+
#[unstable(feature = "hashmap_internals", issue = "0")]
264265
impl super::Hasher for SipHasher13 {
265266
#[inline]
266267
fn write(&mut self, msg: &[u8]) {

src/libcore/tests/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#![feature(fixed_size_array)]
2222
#![feature(flt2dec)]
2323
#![feature(fmt_internals)]
24+
#![feature(hashmap_internals)]
2425
#![feature(iterator_step_by)]
2526
#![feature(i128_type)]
2627
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
@@ -35,7 +36,6 @@
3536
#![feature(range_is_empty)]
3637
#![feature(raw)]
3738
#![feature(refcell_replace_swap)]
38-
#![feature(sip_hash_13)]
3939
#![feature(slice_patterns)]
4040
#![feature(sort_internals)]
4141
#![feature(specialization)]

src/libstd/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@
267267
#![feature(fn_traits)]
268268
#![feature(fnbox)]
269269
#![feature(generic_param_attrs)]
270-
#![feature(hashmap_hasher)]
270+
#![feature(hashmap_internals)]
271271
#![feature(heap_api)]
272272
#![feature(i128)]
273273
#![feature(i128_type)]
@@ -298,7 +298,6 @@
298298
#![feature(raw)]
299299
#![feature(rustc_attrs)]
300300
#![feature(stdsimd)]
301-
#![feature(sip_hash_13)]
302301
#![feature(slice_bytes)]
303302
#![feature(slice_concat_ext)]
304303
#![feature(slice_internals)]

0 commit comments

Comments
 (0)