mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-10 05:53:10 +00:00
auto merge of #8805 : jfager/rust/remove-hashutil, r=alexcrichton
This commit is contained in:
commit
78c5f97a09
@ -26,7 +26,6 @@ use middle::typeck;
|
||||
use middle::astencode::vtable_decoder_helpers;
|
||||
|
||||
|
||||
use std::hash::HashUtil;
|
||||
use std::u64;
|
||||
use std::io::WriterUtil;
|
||||
use std::io;
|
||||
|
@ -21,7 +21,6 @@ use middle::typeck;
|
||||
use middle::astencode;
|
||||
use middle;
|
||||
|
||||
use std::hash::HashUtil;
|
||||
use std::hashmap::{HashMap, HashSet};
|
||||
use std::io;
|
||||
use std::str;
|
||||
|
@ -59,14 +59,7 @@ pub trait Hash {
|
||||
* 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) }
|
||||
}
|
||||
|
@ -19,8 +19,6 @@ struct Foo {
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -17,8 +17,6 @@ struct Foo {
|
||||
}
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user