about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Bukaj <jakub@jakub.cc>2014-11-23 14:11:55 -0500
committerJakub Bukaj <jakub@jakub.cc>2014-11-23 14:11:55 -0500
commit5ad15128503e2eb72491171f6289edce837b08b0 (patch)
treef18fcfab82afc8127ee242bf9e1b90662895e6c1
parent072015ee3d0495578c6072c6af38544e1af3710b (diff)
parent97d435497c7fce811d39d2cc0882d2b8deaf415f (diff)
downloadrust-5ad15128503e2eb72491171f6289edce837b08b0.tar.gz
rust-5ad15128503e2eb72491171f6289edce837b08b0.zip
rollup merge of #19210: petrochenkov/master
Now `std::hash::hash("abcd")` works.
-rw-r--r--src/libcollections/hash/sip.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcollections/hash/sip.rs b/src/libcollections/hash/sip.rs
index 67ac73bf0b9..ab69a3ad8b8 100644
--- a/src/libcollections/hash/sip.rs
+++ b/src/libcollections/hash/sip.rs
@@ -251,7 +251,7 @@ impl Default for SipHasher {
 
 /// Hashes a value using the SipHash algorithm.
 #[inline]
-pub fn hash<T: Hash<SipState>>(value: &T) -> u64 {
+pub fn hash<Sized? T: Hash<SipState>>(value: &T) -> u64 {
     let mut state = SipState::new();
     value.hash(&mut state);
     state.result()
@@ -259,7 +259,7 @@ pub fn hash<T: Hash<SipState>>(value: &T) -> u64 {
 
 /// Hashes a value with the SipHash algorithm with the provided keys.
 #[inline]
-pub fn hash_with_keys<T: Hash<SipState>>(k0: u64, k1: u64, value: &T) -> u64 {
+pub fn hash_with_keys<Sized? T: Hash<SipState>>(k0: u64, k1: u64, value: &T) -> u64 {
     let mut state = SipState::new_with_keys(k0, k1);
     value.hash(&mut state);
     state.result()