]> git.lizzy.rs Git - rust.git/commitdiff
Mark deprecated unstable SipHasher13 as a doc-hidden impl detail of HashMap.
authorSimon Sapin <simon.sapin@exyr.org>
Sat, 17 Mar 2018 10:07:50 +0000 (11:07 +0100)
committerSimon Sapin <simon.sapin@exyr.org>
Sat, 17 Mar 2018 12:04:13 +0000 (13:04 +0100)
It stays in libcore rather than being private in HashMap’s module
because it shares code with the deprecated *stable* `SipHasher` type.

src/libcore/hash/mod.rs
src/libcore/hash/sip.rs
src/libcore/tests/lib.rs
src/libstd/lib.rs

index 90d9ab3644a8272f799fd8fb6c77eb5f0f2da81c..ab714645675af153fb5473534cb4a0177694319a 100644 (file)
@@ -99,8 +99,9 @@
 #[allow(deprecated)]
 pub use self::sip::SipHasher;
 
-#[unstable(feature = "sip_hash_13", issue = "34767")]
+#[unstable(feature = "hashmap_internals", issue = "0")]
 #[allow(deprecated)]
+#[doc(hidden)]
 pub use self::sip::SipHasher13;
 
 mod sip;
index 7790118fbde1c73c1d6b2b59cefd1d512666a1a4..e3bdecdc4b1fd714ede210948c373d048bf30abe 100644 (file)
 /// (eg. `collections::HashMap` uses it by default).
 ///
 /// See: <https://131002.net/siphash>
-#[unstable(feature = "sip_hash_13", issue = "34767")]
+#[unstable(feature = "hashmap_internals", issue = "0")]
 #[rustc_deprecated(since = "1.13.0",
                    reason = "use `std::collections::hash_map::DefaultHasher` instead")]
 #[derive(Debug, Clone, Default)]
+#[doc(hidden)]
 pub struct SipHasher13 {
     hasher: Hasher<Sip13Rounds>,
 }
@@ -34,7 +35,7 @@ pub struct SipHasher13 {
 /// An implementation of SipHash 2-4.
 ///
 /// See: <https://131002.net/siphash/>
-#[unstable(feature = "sip_hash_13", issue = "34767")]
+#[unstable(feature = "hashmap_internals", issue = "0")]
 #[rustc_deprecated(since = "1.13.0",
                    reason = "use `std::collections::hash_map::DefaultHasher` instead")]
 #[derive(Debug, Clone, Default)]
@@ -165,7 +166,7 @@ pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher {
 impl SipHasher13 {
     /// Creates a new `SipHasher13` with the two initial keys set to 0.
     #[inline]
-    #[unstable(feature = "sip_hash_13", issue = "34767")]
+    #[unstable(feature = "hashmap_internals", issue = "0")]
     #[rustc_deprecated(since = "1.13.0",
                        reason = "use `std::collections::hash_map::DefaultHasher` instead")]
     pub fn new() -> SipHasher13 {
@@ -174,7 +175,7 @@ pub fn new() -> SipHasher13 {
 
     /// Creates a `SipHasher13` that is keyed off the provided keys.
     #[inline]
-    #[unstable(feature = "sip_hash_13", issue = "34767")]
+    #[unstable(feature = "hashmap_internals", issue = "0")]
     #[rustc_deprecated(since = "1.13.0",
                        reason = "use `std::collections::hash_map::DefaultHasher` instead")]
     pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher13 {
@@ -260,7 +261,7 @@ fn finish(&self) -> u64 {
     }
 }
 
-#[unstable(feature = "sip_hash_13", issue = "34767")]
+#[unstable(feature = "hashmap_internals", issue = "0")]
 impl super::Hasher for SipHasher13 {
     #[inline]
     fn write(&mut self, msg: &[u8]) {
index e53964b5769bd4edce5a188651b1a1ed61ea0e78..1c876fa0bd7d05ed541e2d5f0c8c80494c806185 100644 (file)
@@ -21,6 +21,7 @@
 #![feature(fixed_size_array)]
 #![feature(flt2dec)]
 #![feature(fmt_internals)]
+#![feature(hashmap_internals)]
 #![feature(iterator_step_by)]
 #![feature(i128_type)]
 #![cfg_attr(stage0, feature(inclusive_range_syntax))]
@@ -35,7 +36,6 @@
 #![feature(range_is_empty)]
 #![feature(raw)]
 #![feature(refcell_replace_swap)]
-#![feature(sip_hash_13)]
 #![feature(slice_patterns)]
 #![feature(sort_internals)]
 #![feature(specialization)]
index 70a1f82c9a159be64737616e48735449558841b1..62bef4bc49913dd49371705c669322c95ebf4d53 100644 (file)
 #![feature(fn_traits)]
 #![feature(fnbox)]
 #![feature(generic_param_attrs)]
-#![feature(hashmap_hasher)]
+#![feature(hashmap_internals)]
 #![feature(heap_api)]
 #![feature(i128)]
 #![feature(i128_type)]
 #![feature(raw)]
 #![feature(rustc_attrs)]
 #![feature(stdsimd)]
-#![feature(sip_hash_13)]
 #![feature(slice_bytes)]
 #![feature(slice_concat_ext)]
 #![feature(slice_internals)]