@@ -166,16 +166,18 @@ impl SipHasher13 {
166166 /// Creates a new `SipHasher13` with the two initial keys set to 0.
167167 #[ inline]
168168 #[ unstable( feature = "hashmap_internals" , issue = "none" ) ]
169+ #[ rustc_const_unstable( feature = "const_default" , issue = "143894" ) ]
169170 #[ deprecated( since = "1.13.0" , note = "use `std::hash::DefaultHasher` instead" ) ]
170- pub fn new ( ) -> SipHasher13 {
171+ pub const fn new ( ) -> SipHasher13 {
171172 SipHasher13 :: new_with_keys ( 0 , 0 )
172173 }
173174
174175 /// Creates a `SipHasher13` that is keyed off the provided keys.
175176 #[ inline]
176177 #[ unstable( feature = "hashmap_internals" , issue = "none" ) ]
178+ #[ rustc_const_unstable( feature = "const_default" , issue = "143894" ) ]
177179 #[ deprecated( since = "1.13.0" , note = "use `std::hash::DefaultHasher` instead" ) ]
178- pub fn new_with_keys ( key0 : u64 , key1 : u64 ) -> SipHasher13 {
180+ pub const fn new_with_keys ( key0 : u64 , key1 : u64 ) -> SipHasher13 {
179181 SipHasher13 { hasher : Hasher :: new_with_keys ( key0, key1) }
180182 }
181183}
@@ -338,7 +340,8 @@ impl<S: Sip> Clone for Hasher<S> {
338340 }
339341}
340342
341- impl < S : Sip > Default for Hasher < S > {
343+ #[ rustc_const_unstable( feature = "const_default" , issue = "143894" ) ]
344+ impl < S : Sip > const Default for Hasher < S > {
342345 /// Creates a `Hasher<S>` with the two initial keys set to 0.
343346 #[ inline]
344347 fn default ( ) -> Hasher < S > {
0 commit comments