use middle::astencode::vtable_decoder_helpers;
-use std::hash::HashUtil;
use std::u64;
use std::io::WriterUtil;
use std::io;
use middle::astencode;
use middle;
-use std::hash::HashUtil;
use std::hashmap::{HashMap, HashSet};
use std::io;
use std::str;
* IterBytes trait, that feeds SipHash.
*/
fn hash_keyed(&self, k0: u64, k1: u64) -> u64;
-}
-
-// When we have default methods, won't need this.
-pub trait HashUtil {
- fn hash(&self) -> u64;
-}
-impl<A:Hash> HashUtil for A {
#[inline]
fn hash(&self) -> u64 { self.hash_keyed(0,0) }
}
}
pub fn main() {
- use std::hash::HashUtil; // necessary for IterBytes check
-
let a = Foo {bar: 4, baz: -3};
a == a; // check for Eq impl w/o testing its correctness
}
pub fn main() {
- use std::hash::HashUtil; // necessary for IterBytes check
-
let a = Foo {bar: 4, baz: -3};
a == a; // check for Eq impl w/o testing its correctness