Skip to content

Commit da559b2

Browse files
committed
Replace HashUtil w/ default method on Hash
1 parent 58d6eb5 commit da559b2

File tree

5 files changed

+0
-13
lines changed

5 files changed

+0
-13
lines changed

src/librustc/metadata/decoder.rs

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ use middle::typeck;
2525
use middle::astencode::vtable_decoder_helpers;
2626

2727

28-
use std::hash::HashUtil;
2928
use std::u64;
3029
use std::io::WriterUtil;
3130
use std::io;

src/librustc/metadata/encoder.rs

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use middle::typeck;
2121
use middle::astencode;
2222
use middle;
2323

24-
use std::hash::HashUtil;
2524
use std::hashmap::{HashMap, HashSet};
2625
use std::io;
2726
use std::str;

src/libstd/hash.rs

-7
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,7 @@ pub trait Hash {
5959
* IterBytes trait, that feeds SipHash.
6060
*/
6161
fn hash_keyed(&self, k0: u64, k1: u64) -> u64;
62-
}
63-
64-
// When we have default methods, won't need this.
65-
pub trait HashUtil {
66-
fn hash(&self) -> u64;
67-
}
6862

69-
impl<A:Hash> HashUtil for A {
7063
#[inline]
7164
fn hash(&self) -> u64 { self.hash_keyed(0,0) }
7265
}

src/test/run-pass/deriving-meta-multiple.rs

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ struct Foo {
1919
}
2020

2121
pub fn main() {
22-
use std::hash::HashUtil; // necessary for IterBytes check
23-
2422
let a = Foo {bar: 4, baz: -3};
2523

2624
a == a; // check for Eq impl w/o testing its correctness

src/test/run-pass/deriving-meta.rs

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ struct Foo {
1717
}
1818

1919
pub fn main() {
20-
use std::hash::HashUtil; // necessary for IterBytes check
21-
2220
let a = Foo {bar: 4, baz: -3};
2321

2422
a == a; // check for Eq impl w/o testing its correctness

0 commit comments

Comments
 (0)