From d223dd1e57cc412aa2eff28e6604f86b9f013083 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Fri, 21 Feb 2014 21:33:23 -0800 Subject: std: rewrite Hash to make it more generic This patch merges IterBytes and Hash traits, which clears up the confusion of using `#[deriving(IterBytes)]` to support hashing. Instead, it now is much easier to use the new `#[deriving(Hash)]` for making a type hashable with a stream hash. Furthermore, it supports custom non-stream-based hashers, such as if a value's hash was cached in a database. This does not yet replace the old IterBytes-hash with this new version. --- src/libsyntax/util/interner.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libsyntax/util') diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index aedff2d7854..1c801f7d970 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -17,6 +17,7 @@ use ast::Name; use std::cast; use std::cell::RefCell; use std::cmp::Equiv; +use std::hash_old::Hash; use std::hashmap::HashMap; use std::rc::Rc; -- cgit 1.4.1-3-g733a5