Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First phase of a Hash reimplementation #11863

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/etc/generate-deriving-span-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ def write_file(name, string):
('Clone', [], 1), ('DeepClone', ['Clone'], 1),
('Eq', [], 2), ('Ord', [], 8),
('TotalEq', [], 1), ('TotalOrd', ['TotalEq'], 1),
('Show', [], 1)]:
('Show', [], 1),
('Hash', [], 1)]:
traits[trait] = (ALL, supers, errs)

for (trait, (types, super_traits, error_count)) in traits.items():
Expand Down
1 change: 1 addition & 0 deletions src/libextra/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#[allow(missing_doc)];

use std::cmp;
use std::hash_old::Hash;
use std::hashmap;
use std::io;
use std::mem;
Expand Down
1 change: 1 addition & 0 deletions src/librustc/metadata/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use middle::typeck;
use middle::astencode::vtable_decoder_helpers;

use std::u64;
use std::hash_old::Hash;
use std::io;
use std::io::extensions::u64_from_be_bytes;
use std::option;
Expand Down
1 change: 1 addition & 0 deletions src/librustc/metadata/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use middle;
use serialize::Encodable;
use std::cast;
use std::cell::{Cell, RefCell};
use std::hash_old::Hash;
use std::hashmap::{HashMap, HashSet};
use std::io::MemWriter;
use std::str;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4916,7 +4916,7 @@ pub fn trait_method_of_method(tcx: ctxt,
/// Creates a hash of the type `t` which will be the same no matter what crate
/// context it's calculated within. This is used by the `type_id` intrinsic.
pub fn hash_crate_independent(tcx: ctxt, t: t, local_hash: ~str) -> u64 {
use std::hash::{SipState, Streaming};
use std::hash_old::{SipState, Streaming};

let mut hash = SipState::new(0, 0);
let region = |_hash: &mut SipState, r: Region| {
Expand Down
1 change: 1 addition & 0 deletions src/libserialize/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
Core encoding and decoding interfaces.
*/

use std::hash_old::Hash;
use std::hashmap::{HashMap, HashSet};
use std::rc::Rc;
use std::trie::{TrieMap, TrieSet};
Expand Down
Loading