about summary refs log tree commit diff
path: root/src/rustc
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-09-19 15:13:04 -0700
committerGraydon Hoare <graydon@mozilla.com>2012-09-19 15:51:44 -0700
commit1ffd90edbc5494d54ab911e9931c296aca7a7707 (patch)
tree7d6cf224429bdc7f26cef9b91ccd170a9318b7e6 /src/rustc
parent384906c1e807196fbb8653e3233c92f920888d40 (diff)
downloadrust-1ffd90edbc5494d54ab911e9931c296aca7a7707.tar.gz
rust-1ffd90edbc5494d54ab911e9931c296aca7a7707.zip
Remove redundant hashmap constructor functions.
Diffstat (limited to 'src/rustc')
-rw-r--r--src/rustc/back/rpath.rs2
-rw-r--r--src/rustc/lib/llvm.rs2
-rw-r--r--src/rustc/metadata/creader.rs4
-rw-r--r--src/rustc/metadata/cstore.rs7
-rw-r--r--src/rustc/metadata/decoder.rs4
-rw-r--r--src/rustc/middle/borrowck.rs4
-rw-r--r--src/rustc/middle/borrowck/check_loans.rs2
-rw-r--r--src/rustc/middle/borrowck/gather_loans.rs4
-rw-r--r--src/rustc/middle/capture.rs4
-rw-r--r--src/rustc/middle/freevars.rs4
-rw-r--r--src/rustc/middle/lang_items.rs4
-rw-r--r--src/rustc/middle/lint.rs6
-rw-r--r--src/rustc/middle/liveness.rs12
-rw-r--r--src/rustc/middle/pat_util.rs2
-rw-r--r--src/rustc/middle/region.rs11
-rw-r--r--src/rustc/middle/resolve.rs22
-rw-r--r--src/rustc/middle/trans/alt.rs2
-rw-r--r--src/rustc/middle/trans/base.rs41
-rw-r--r--src/rustc/middle/trans/build.rs4
-rw-r--r--src/rustc/middle/trans/debuginfo.rs2
-rw-r--r--src/rustc/middle/trans/reachable.rs2
-rw-r--r--src/rustc/middle/trans/reflect.rs2
-rw-r--r--src/rustc/middle/trans/shape.rs2
-rw-r--r--src/rustc/middle/ty.rs22
-rw-r--r--src/rustc/middle/typeck.rs8
-rw-r--r--src/rustc/middle/typeck/check.rs14
-rw-r--r--src/rustc/middle/typeck/check/alt.rs4
-rw-r--r--src/rustc/middle/typeck/check/method.rs4
-rw-r--r--src/rustc/middle/typeck/check/vtable.rs3
-rw-r--r--src/rustc/middle/typeck/coherence.rs14
-rw-r--r--src/rustc/middle/typeck/infer/region_var_bindings.rs4
31 files changed, 109 insertions, 113 deletions
diff --git a/src/rustc/back/rpath.rs b/src/rustc/back/rpath.rs
index df3e9e88185..5dcc4a5eca3 100644
--- a/src/rustc/back/rpath.rs
+++ b/src/rustc/back/rpath.rs
@@ -167,7 +167,7 @@ fn get_install_prefix_rpath(target_triple: &str) -> Path {
 }
 
 fn minimize_rpaths(rpaths: &[Path]) -> ~[Path] {
-    let set = map::str_hash::<()>();
+    let set = map::HashMap();
     let mut minimized = ~[];
     for rpaths.each |rpath| {
         let s = rpath.to_str();
diff --git a/src/rustc/lib/llvm.rs b/src/rustc/lib/llvm.rs
index 4ccf8439d3f..bd97c896a45 100644
--- a/src/rustc/lib/llvm.rs
+++ b/src/rustc/lib/llvm.rs
@@ -1058,7 +1058,7 @@ fn mk_type_names() -> type_names {
     pure fn hash(t: &TypeRef) -> uint { *t as uint }
     pure fn eq(a: &TypeRef, b: &TypeRef) -> bool { *a == *b }
     @{type_names: std::map::HashMap(),
-      named_types: std::map::str_hash()}
+      named_types: std::map::HashMap()}
 }
 
 fn type_to_str(names: type_names, ty: TypeRef) -> ~str {
diff --git a/src/rustc/metadata/creader.rs b/src/rustc/metadata/creader.rs
index 1d007fbfdd0..017dbf6836f 100644
--- a/src/rustc/metadata/creader.rs
+++ b/src/rustc/metadata/creader.rs
@@ -5,7 +5,7 @@ use syntax::{ast, ast_util};
 use syntax::attr;
 use syntax::visit;
 use syntax::codemap::span;
-use std::map::{HashMap, int_hash};
+use std::map::HashMap;
 use syntax::print::pprust;
 use filesearch::filesearch;
 use common::*;
@@ -248,7 +248,7 @@ fn resolve_crate_deps(e: env, cdata: @~[u8]) -> cstore::cnum_map {
     debug!("resolving deps of external crate");
     // The map from crate numbers in the crate we're resolving to local crate
     // numbers
-    let cnum_map = int_hash::<ast::crate_num>();
+    let cnum_map = HashMap::<int,ast::crate_num>();
     for decoder::get_crate_deps(e.intr, cdata).each |dep| {
         let extrn_cnum = dep.cnum;
         let cname = dep.name;
diff --git a/src/rustc/metadata/cstore.rs b/src/rustc/metadata/cstore.rs
index 937745eb3f6..cec533a2d0c 100644
--- a/src/rustc/metadata/cstore.rs
+++ b/src/rustc/metadata/cstore.rs
@@ -4,7 +4,6 @@
 use std::map;
 use std::map::HashMap;
 use syntax::{ast, attr};
-use syntax::ast_util::new_def_hash;
 use syntax::parse::token::ident_interner;
 
 export cstore;
@@ -70,9 +69,9 @@ pure fn p(cstore: cstore) -> cstore_private {
 }
 
 fn mk_cstore(intr: ident_interner) -> cstore {
-    let meta_cache = map::int_hash::<crate_metadata>();
-    let crate_map = map::int_hash::<ast::crate_num>();
-    let mod_path_map = new_def_hash();
+    let meta_cache = map::HashMap::<int,crate_metadata>();
+    let crate_map = map::HashMap::<int,ast::crate_num>();
+    let mod_path_map = HashMap();
     return private(@{metas: meta_cache,
                      use_crate_map: crate_map,
                      mod_path_map: mod_path_map,
diff --git a/src/rustc/metadata/decoder.rs b/src/rustc/metadata/decoder.rs
index 14244b08208..cf76cf110e9 100644
--- a/src/rustc/metadata/decoder.rs
+++ b/src/rustc/metadata/decoder.rs
@@ -1,7 +1,7 @@
 // Decoding metadata from a single crate's metadata
 
 use std::{ebml, map};
-use std::map::{HashMap, str_hash};
+use std::map::HashMap;
 use io::WriterUtil;
 use dvec::DVec;
 use syntax::{ast, ast_util};
@@ -969,7 +969,7 @@ fn get_crate_module_paths(intr: ident_interner, cdata: cmd)
     // find all module (path, def_ids), which are not
     // fowarded path due to renamed import or reexport
     let mut res = ~[];
-    let mods = map::str_hash();
+    let mods = map::HashMap::<~str,bool>();
     do iter_crate_items(intr, cdata) |path, did| {
         let m = mod_of_path(path);
         if str::is_not_empty(m) {
diff --git a/src/rustc/middle/borrowck.rs b/src/rustc/middle/borrowck.rs
index f43c4dbba67..d2327bd3ce5 100644
--- a/src/rustc/middle/borrowck.rs
+++ b/src/rustc/middle/borrowck.rs
@@ -222,7 +222,7 @@ use syntax::ast_map;
 use syntax::codemap::span;
 use util::ppaux::{ty_to_str, region_to_str, explain_region,
                   expr_repr, note_and_explain_region};
-use std::map::{int_hash, HashMap, Set};
+use std::map::{HashMap, Set};
 use std::list;
 use std::list::{List, Cons, Nil};
 use result::{Result, Ok, Err};
@@ -244,7 +244,7 @@ fn check_crate(tcx: ty::ctxt,
                                 method_map: method_map,
                                 last_use_map: last_use_map,
                                 root_map: root_map(),
-                                mutbl_map: int_hash(),
+                                mutbl_map: HashMap(),
                                 mut loaned_paths_same: 0,
                                 mut loaned_paths_imm: 0,
                                 mut stable_paths: 0,
diff --git a/src/rustc/middle/borrowck/check_loans.rs b/src/rustc/middle/borrowck/check_loans.rs
index b7fe652b9c2..839c2f55894 100644
--- a/src/rustc/middle/borrowck/check_loans.rs
+++ b/src/rustc/middle/borrowck/check_loans.rs
@@ -61,7 +61,7 @@ fn check_loans(bccx: borrowck_ctxt,
                crate: @ast::crate) {
     let clcx = check_loan_ctxt(@{bccx: bccx,
                                  req_maps: req_maps,
-                                 reported: int_hash(),
+                                 reported: HashMap(),
                                  mut in_ctor: false,
                                  mut declared_purity: ast::impure_fn,
                                  mut fn_args: @~[]});
diff --git a/src/rustc/middle/borrowck/gather_loans.rs b/src/rustc/middle/borrowck/gather_loans.rs
index 109c1f63644..167e19152fa 100644
--- a/src/rustc/middle/borrowck/gather_loans.rs
+++ b/src/rustc/middle/borrowck/gather_loans.rs
@@ -47,8 +47,8 @@ enum gather_loan_ctxt = @{bccx: borrowck_ctxt,
 
 fn gather_loans(bccx: borrowck_ctxt, crate: @ast::crate) -> req_maps {
     let glcx = gather_loan_ctxt(@{bccx: bccx,
-                                  req_maps: {req_loan_map: int_hash(),
-                                             pure_map: int_hash()},
+                                  req_maps: {req_loan_map: HashMap(),
+                                             pure_map: HashMap()},
                                   mut item_ub: 0,
                                   mut root_ub: 0});
     let v = visit::mk_vt(@{visit_expr: req_loans_in_expr,
diff --git a/src/rustc/middle/capture.rs b/src/rustc/middle/capture.rs
index 094e7e03a82..25c5b16194d 100644
--- a/src/rustc/middle/capture.rs
+++ b/src/rustc/middle/capture.rs
@@ -36,7 +36,7 @@ fn check_capture_clause(tcx: ty::ctxt,
                         fn_expr_id: ast::node_id,
                         cap_clause: ast::capture_clause) {
     let freevars = freevars::get_freevars(tcx, fn_expr_id);
-    let seen_defs = map::int_hash();
+    let seen_defs = map::HashMap();
 
     for (*cap_clause).each |cap_item| {
         let cap_def = tcx.def_map.get(cap_item.id);
@@ -62,7 +62,7 @@ fn compute_capture_vars(tcx: ty::ctxt,
                         fn_proto: ty::fn_proto,
                         cap_clause: ast::capture_clause) -> ~[capture_var] {
     let freevars = freevars::get_freevars(tcx, fn_expr_id);
-    let cap_map = map::int_hash();
+    let cap_map = map::HashMap();
 
     // first add entries for anything explicitly named in the cap clause
 
diff --git a/src/rustc/middle/freevars.rs b/src/rustc/middle/freevars.rs
index f59be3e02ec..251ef2c89b7 100644
--- a/src/rustc/middle/freevars.rs
+++ b/src/rustc/middle/freevars.rs
@@ -32,7 +32,7 @@ type freevar_map = HashMap<ast::node_id, freevar_info>;
 // in order to start the search.
 fn collect_freevars(def_map: resolve::DefMap, blk: ast::blk)
     -> freevar_info {
-    let seen = int_hash();
+    let seen = HashMap();
     let refs = @mut ~[];
 
     fn ignore_item(_i: @ast::item, &&_depth: int, _v: visit::vt<int>) { }
@@ -87,7 +87,7 @@ fn collect_freevars(def_map: resolve::DefMap, blk: ast::blk)
 // one pass. This could be improved upon if it turns out to matter.
 fn annotate_freevars(def_map: resolve::DefMap, crate: @ast::crate) ->
    freevar_map {
-    let freevars = int_hash();
+    let freevars = HashMap();
 
     let walk_fn = fn@(_fk: visit::fn_kind, _decl: ast::fn_decl,
                       blk: ast::blk, _sp: span, nid: ast::node_id) {
diff --git a/src/rustc/middle/lang_items.rs b/src/rustc/middle/lang_items.rs
index cd30e575bda..6e12475cd9d 100644
--- a/src/rustc/middle/lang_items.rs
+++ b/src/rustc/middle/lang_items.rs
@@ -19,7 +19,7 @@ use syntax::ast_util::{local_def};
 use syntax::visit::{default_simple_visitor, mk_simple_visitor};
 use syntax::visit::{visit_crate, visit_item};
 
-use std::map::{HashMap, str_hash};
+use std::map::HashMap;
 use str_eq = str::eq;
 
 struct LanguageItems {
@@ -84,7 +84,7 @@ fn LanguageItemCollector(crate: @crate, session: session,
                          items: &r/LanguageItems)
     -> LanguageItemCollector/&r {
 
-    let item_refs = str_hash();
+    let item_refs = HashMap();
 
     item_refs.insert(~"const", &mut items.const_trait);
     item_refs.insert(~"copy", &mut items.copy_trait);
diff --git a/src/rustc/middle/lint.rs b/src/rustc/middle/lint.rs
index 8e22315ef6b..630be4c6f6b 100644
--- a/src/rustc/middle/lint.rs
+++ b/src/rustc/middle/lint.rs
@@ -4,7 +4,7 @@ use middle::ty;
 use syntax::{ast, ast_util, visit};
 use syntax::attr;
 use syntax::codemap::span;
-use std::map::{Map,HashMap,int_hash,hash_from_strs};
+use std::map::{Map,HashMap};
 use std::smallintmap::{Map,SmallIntMap};
 use io::WriterUtil;
 use util::ppaux::{ty_to_str};
@@ -198,7 +198,7 @@ fn get_lint_dict() -> lint_dict {
            default: warn}),
         */
     ];
-    hash_from_strs(v)
+    std::map::hash_from_vec(v)
 }
 
 // This is a highly not-optimal set of data structure decisions.
@@ -215,7 +215,7 @@ type lint_settings = {
 
 fn mk_lint_settings() -> lint_settings {
     {default_settings: std::smallintmap::mk(),
-     settings_map: int_hash()}
+     settings_map: HashMap()}
 }
 
 fn get_lint_level(modes: lint_modes, lint: lint) -> level {
diff --git a/src/rustc/middle/liveness.rs b/src/rustc/middle/liveness.rs
index 30e7f170b26..6a50bdf6698 100644
--- a/src/rustc/middle/liveness.rs
+++ b/src/rustc/middle/liveness.rs
@@ -101,7 +101,7 @@
  */
 
 use dvec::DVec;
-use std::map::{HashMap, int_hash, str_hash, uint_hash};
+use std::map::HashMap;
 use syntax::{visit, ast_util};
 use syntax::print::pprust::{expr_to_str};
 use visit::vt;
@@ -187,7 +187,7 @@ fn check_crate(tcx: ty::ctxt,
         .. *visit::default_visitor()
     });
 
-    let last_use_map = int_hash();
+    let last_use_map = HashMap();
     let initial_maps = @IrMaps(tcx, method_map, last_use_map);
     visit::visit_crate(*crate, initial_maps, visitor);
     tcx.sess.abort_if_errors();
@@ -290,10 +290,10 @@ fn IrMaps(tcx: ty::ctxt, method_map: typeck::method_map,
         last_use_map: last_use_map,
         num_live_nodes: 0u,
         num_vars: 0u,
-        live_node_map: int_hash(),
-        variable_map: int_hash(),
-        capture_map: int_hash(),
-        field_map: uint_hash(),
+        live_node_map: HashMap(),
+        variable_map: HashMap(),
+        capture_map: HashMap(),
+        field_map: HashMap(),
         var_kinds: ~[],
         lnks: ~[]
     }
diff --git a/src/rustc/middle/pat_util.rs b/src/rustc/middle/pat_util.rs
index 043f14113ba..e67b85b869c 100644
--- a/src/rustc/middle/pat_util.rs
+++ b/src/rustc/middle/pat_util.rs
@@ -14,7 +14,7 @@ type PatIdMap = std::map::HashMap<ident, node_id>;
 // This is used because same-named variables in alternative patterns need to
 // use the node_id of their namesake in the first pattern.
 fn pat_id_map(dm: resolve::DefMap, pat: @pat) -> PatIdMap {
-    let map = std::map::uint_hash();
+    let map = std::map::HashMap();
     do pat_bindings(dm, pat) |_bm, p_id, _s, n| {
       map.insert(path_to_ident(n), p_id);
     };
diff --git a/src/rustc/middle/region.rs b/src/rustc/middle/region.rs
index 4e1e0decdef..5c6e55fe422 100644
--- a/src/rustc/middle/region.rs
+++ b/src/rustc/middle/region.rs
@@ -12,7 +12,6 @@ use middle::ty;
 use syntax::{ast, visit};
 use syntax::codemap::span;
 use syntax::print::pprust;
-use syntax::ast_util::new_def_hash;
 use syntax::ast_map;
 use dvec::DVec;
 use metadata::csearch;
@@ -20,7 +19,7 @@ use ty::{region_variance, rv_covariant, rv_invariant, rv_contravariant};
 
 use std::list;
 use std::list::list;
-use std::map::{HashMap, int_hash};
+use std::map::HashMap;
 
 type parent = Option<ast::node_id>;
 
@@ -333,8 +332,8 @@ fn resolve_crate(sess: session, def_map: resolve::DefMap,
                  crate: @ast::crate) -> region_map {
     let cx: ctxt = ctxt {sess: sess,
                          def_map: def_map,
-                         region_map: int_hash(),
-                         root_exprs: int_hash(),
+                         region_map: HashMap(),
+                         root_exprs: HashMap(),
                          parent: None};
     let visitor = visit::mk_vt(@{
         visit_block: resolve_block,
@@ -762,8 +761,8 @@ fn determine_rp_in_crate(sess: session,
     let cx = determine_rp_ctxt_(@{sess: sess,
                                   ast_map: ast_map,
                                   def_map: def_map,
-                                  region_paramd_items: int_hash(),
-                                  dep_map: int_hash(),
+                                  region_paramd_items: HashMap(),
+                                  dep_map: HashMap(),
                                   worklist: DVec(),
                                   mut item_id: 0,
                                   mut anon_implies_rp: false,
diff --git a/src/rustc/middle/resolve.rs b/src/rustc/middle/resolve.rs
index 1d32d4bc3dc..e2aa963750a 100644
--- a/src/rustc/middle/resolve.rs
+++ b/src/rustc/middle/resolve.rs
@@ -42,7 +42,7 @@ use syntax::ast::{ty_u16, ty_u32, ty_u64, ty_u8, ty_uint, type_value_ns};
 use syntax::ast::{variant, view_item, view_item_export, view_item_import};
 use syntax::ast::{view_item_use, view_path_glob, view_path_list};
 use syntax::ast::{view_path_simple, visibility, anonymous, named};
-use syntax::ast_util::{def_id_of_def, dummy_sp, local_def, new_def_hash};
+use syntax::ast_util::{def_id_of_def, dummy_sp, local_def};
 use syntax::ast_util::{path_to_ident, walk_pat, trait_method_to_ty_method};
 use syntax::attr::{attr_metas, contains_name};
 use syntax::print::pprust::{pat_to_str, path_to_str};
@@ -60,7 +60,7 @@ use vec::pop;
 use syntax::parse::token::ident_interner;
 
 use std::list::{Cons, List, Nil};
-use std::map::{HashMap, int_hash, uint_hash};
+use std::map::HashMap;
 use str_eq = str::eq;
 
 // Definition mapping
@@ -458,7 +458,7 @@ fn Module(parent_link: ParentLink, def_id: Option<def_id>) -> Module {
         def_id: def_id,
         children: atom_hashmap(),
         imports: DVec(),
-        anonymous_children: int_hash(),
+        anonymous_children: HashMap(),
         exported_names: atom_hashmap(),
         import_resolutions: atom_hashmap(),
         glob_count: 0u,
@@ -701,8 +701,8 @@ fn Resolver(session: session, lang_items: LanguageItems,
 
         unused_import_lint_level: unused_import_lint_level(session),
 
-        trait_info: new_def_hash(),
-        structs: new_def_hash(),
+        trait_info: HashMap(),
+        structs: HashMap(),
 
         unresolved_imports: 0u,
 
@@ -720,10 +720,10 @@ fn Resolver(session: session, lang_items: LanguageItems,
 
         namespaces: ~[ ModuleNS, TypeNS, ValueNS ],
 
-        def_map: int_hash(),
-        export_map: int_hash(),
-        export_map2: int_hash(),
-        trait_map: @int_hash(),
+        def_map: HashMap(),
+        export_map: HashMap(),
+        export_map2: HashMap(),
+        trait_map: @HashMap(),
 
         intr: session.intr()
     };
@@ -1510,7 +1510,7 @@ impl Resolver {
      * crate.
      */
     fn build_reduced_graph_for_external_crate(root: @Module) {
-        let modules = new_def_hash();
+        let modules = HashMap();
 
         // Create all the items reachable by paths.
         for each_path(self.session.cstore, get(root.def_id).crate)
@@ -3664,7 +3664,7 @@ impl Resolver {
     }
 
     fn binding_mode_map(pat: @pat) -> BindingMap {
-        let result = uint_hash();
+        let result = HashMap();
         do pat_bindings(self.def_map, pat) |binding_mode, _id, sp, path| {
             let ident = path_to_ident(path);
             result.insert(ident,
diff --git a/src/rustc/middle/trans/alt.rs b/src/rustc/middle/trans/alt.rs
index faba978eef5..dddcc70f232 100644
--- a/src/rustc/middle/trans/alt.rs
+++ b/src/rustc/middle/trans/alt.rs
@@ -1096,7 +1096,7 @@ fn trans_alt_inner(scope_cx: block,
         // to an alloca() that will be the value for that local variable.
         // Note that we use the names because each binding will have many ids
         // from the various alternatives.
-        let bindings_map = std::map::uint_hash();
+        let bindings_map = std::map::HashMap();
         do pat_bindings(tcx.def_map, arm.pats[0]) |bm, p_id, _s, path| {
             let ident = path_to_ident(path);
             let variable_ty = node_id_type(bcx, p_id);
diff --git a/src/rustc/middle/trans/base.rs b/src/rustc/middle/trans/base.rs
index 47afe477287..2cd4b2c7ec8 100644
--- a/src/rustc/middle/trans/base.rs
+++ b/src/rustc/middle/trans/base.rs
@@ -16,7 +16,6 @@
 use libc::{c_uint, c_ulonglong};
 use std::{map, time, list};
 use std::map::HashMap;
-use std::map::{int_hash, str_hash};
 use driver::session;
 use session::session;
 use syntax::attr;
@@ -1407,9 +1406,9 @@ fn new_fn_ctxt_w_id(ccx: @crate_ctxt, path: path,
           mut llself: None,
           mut personality: None,
           mut loop_ret: None,
-          llargs: int_hash::<local_val>(),
-          lllocals: int_hash::<local_val>(),
-          llupvars: int_hash::<ValueRef>(),
+          llargs: HashMap::<int,local_val>(),
+          lllocals: HashMap::<int,local_val>(),
+          llupvars: HashMap::<int,ValueRef>(),
           id: id,
           param_substs: param_substs,
           span: sp,
@@ -2309,7 +2308,7 @@ fn declare_intrinsics(llmod: ModuleRef) -> HashMap<~str, ValueRef> {
     let frameaddress = decl_cdecl_fn(llmod, ~"llvm.frameaddress",
                                      T_fn(T_frameaddress_args,
                                           T_ptr(T_i8())));
-    let intrinsics = str_hash::<ValueRef>();
+    let intrinsics = HashMap::<~str,ValueRef>();
     intrinsics.insert(~"llvm.gcroot", gcroot);
     intrinsics.insert(~"llvm.gcread", gcread);
     intrinsics.insert(~"llvm.memmove.p0i8.p0i8.i32", memmove32);
@@ -2624,35 +2623,35 @@ fn trans_crate(sess: session::session,
           llmod: llmod,
           td: td,
           tn: tn,
-          externs: str_hash::<ValueRef>(),
+          externs: HashMap::<~str,ValueRef>(),
           intrinsics: intrinsics,
-          item_vals: int_hash::<ValueRef>(),
+          item_vals: HashMap::<int,ValueRef>(),
           exp_map: emap,
           exp_map2: emap2,
           reachable: reachable,
-          item_symbols: int_hash::<~str>(),
+          item_symbols: HashMap::<int,~str>(),
           mut main_fn: None::<ValueRef>,
           link_meta: link_meta,
           enum_sizes: ty::new_ty_hash(),
-          discrims: ast_util::new_def_hash::<ValueRef>(),
-          discrim_symbols: int_hash::<~str>(),
+          discrims: HashMap(),
+          discrim_symbols: HashMap::<int,~str>(),
           tydescs: ty::new_ty_hash(),
           mut finished_tydescs: false,
-          external: ast_util::new_def_hash(),
-          monomorphized: map::HashMap(),
-          monomorphizing: ast_util::new_def_hash(),
-          type_use_cache: ast_util::new_def_hash(),
+          external: HashMap(),
+          monomorphized: HashMap(),
+          monomorphizing: HashMap(),
+          type_use_cache: HashMap(),
           vtables: map::HashMap(),
-          const_cstr_cache: map::str_hash(),
-          const_globals: int_hash::<ValueRef>(),
-          module_data: str_hash::<ValueRef>(),
+          const_cstr_cache: HashMap(),
+          const_globals: HashMap::<int,ValueRef>(),
+          module_data: HashMap::<~str,ValueRef>(),
           lltypes: ty::new_ty_hash(),
           names: new_namegen(sess.parse_sess.interner),
           next_addrspace: new_addrspace_gen(),
           symbol_hasher: symbol_hasher,
           type_hashcodes: ty::new_ty_hash(),
           type_short_names: ty::new_ty_hash(),
-          all_llvm_symbols: str_hash::<()>(),
+          all_llvm_symbols: HashMap::<~str,()>(),
           tcx: tcx,
           maps: maps,
           stats:
@@ -2665,12 +2664,12 @@ fn trans_crate(sess: session::session,
                mut n_inlines: 0u,
                mut n_closures: 0u,
                llvm_insn_ctxt: @mut ~[],
-               llvm_insns: str_hash(),
+               llvm_insns: HashMap(),
                fn_times: @mut ~[]},
           upcalls:
               upcall::declare_upcalls(targ_cfg, tn, tydesc_type,
                                       llmod),
-          rtcalls: str_hash::<ast::def_id>(),
+          rtcalls: HashMap::<~str,ast::def_id>(),
           tydesc_type: tydesc_type,
           int_type: int_type,
           float_type: float_type,
@@ -2681,7 +2680,7 @@ fn trans_crate(sess: session::session,
           crate_map: crate_map,
           mut uses_gc: false,
           dbg_cx: dbg_cx,
-          class_ctors: int_hash::<ast::def_id>(),
+          class_ctors: HashMap::<int,ast::def_id>(),
           mut do_not_commit_warning_issued: false};
 
 
diff --git a/src/rustc/middle/trans/build.rs b/src/rustc/middle/trans/build.rs
index c669dcfbb0d..c0846a601bd 100644
--- a/src/rustc/middle/trans/build.rs
+++ b/src/rustc/middle/trans/build.rs
@@ -1,4 +1,4 @@
-use std::map::{HashMap, str_hash};
+use std::map::HashMap;
 use libc::{c_uint, c_int};
 use lib::llvm::llvm;
 use syntax::codemap;
@@ -24,7 +24,7 @@ fn count_insn(cx: block, category: &str) {
         // Build version of path with cycles removed.
 
         // Pass 1: scan table mapping str -> rightmost pos.
-        let mm = str_hash();
+        let mm = HashMap();
         let len = vec::len(*v);
         let mut i = 0u;
         while i < len {
diff --git a/src/rustc/middle/trans/debuginfo.rs b/src/rustc/middle/trans/debuginfo.rs
index 52b843b3fbe..641f0024820 100644
--- a/src/rustc/middle/trans/debuginfo.rs
+++ b/src/rustc/middle/trans/debuginfo.rs
@@ -91,7 +91,7 @@ type debug_ctxt = {
 };
 
 fn mk_ctxt(crate: ~str, intr: ident_interner) -> debug_ctxt {
-    {llmetadata: map::int_hash(),
+    {llmetadata: map::HashMap(),
      names: new_namegen(intr),
      crate_file: crate}
 }
diff --git a/src/rustc/middle/trans/reachable.rs b/src/rustc/middle/trans/reachable.rs
index d284cd840f1..f1a4a1ff5d1 100644
--- a/src/rustc/middle/trans/reachable.rs
+++ b/src/rustc/middle/trans/reachable.rs
@@ -24,7 +24,7 @@ type ctx = {exp_map: resolve::ExportMap,
 
 fn find_reachable(crate_mod: _mod, exp_map: resolve::ExportMap,
                   tcx: ty::ctxt, method_map: typeck::method_map) -> map {
-    let rmap = std::map::int_hash();
+    let rmap = std::map::HashMap();
     let cx = {exp_map: exp_map, tcx: tcx, method_map: method_map, rmap: rmap};
     traverse_public_mod(cx, crate_mod);
     traverse_all_resources_and_impls(cx, crate_mod);
diff --git a/src/rustc/middle/trans/reflect.rs b/src/rustc/middle/trans/reflect.rs
index 7d75e3517d6..149a751c41f 100644
--- a/src/rustc/middle/trans/reflect.rs
+++ b/src/rustc/middle/trans/reflect.rs
@@ -1,4 +1,4 @@
-use std::map::{HashMap,str_hash};
+use std::map::HashMap;
 use driver::session::session;
 use lib::llvm::{TypeRef, ValueRef};
 use syntax::ast;
diff --git a/src/rustc/middle/trans/shape.rs b/src/rustc/middle/trans/shape.rs
index 44d4128b388..fcbe0427af0 100644
--- a/src/rustc/middle/trans/shape.rs
+++ b/src/rustc/middle/trans/shape.rs
@@ -11,7 +11,7 @@ use back::abi;
 use middle::ty;
 use middle::ty::field;
 use syntax::ast;
-use syntax::ast_util::{dummy_sp, new_def_hash};
+use syntax::ast_util::dummy_sp;
 use syntax::util::interner;
 use util::ppaux::ty_to_str;
 use syntax::codemap::span;
diff --git a/src/rustc/middle/ty.rs b/src/rustc/middle/ty.rs
index f0b71ea556a..5197bd9a161 100644
--- a/src/rustc/middle/ty.rs
+++ b/src/rustc/middle/ty.rs
@@ -8,7 +8,7 @@ use driver::session;
 use session::session;
 use syntax::{ast, ast_map};
 use syntax::ast_util;
-use syntax::ast_util::{is_local, local_def, new_def_hash};
+use syntax::ast_util::{is_local, local_def};
 use syntax::codemap::span;
 use metadata::csearch;
 use util::ppaux::{region_to_str, explain_region, vstore_to_str,
@@ -856,23 +856,23 @@ fn mk_ctxt(s: session::session,
       region_map: region_map,
       region_paramd_items: region_paramd_items,
       node_types: @smallintmap::mk(),
-      node_type_substs: map::int_hash(),
+      node_type_substs: map::HashMap(),
       items: amap,
-      intrinsic_defs: map::uint_hash(),
+      intrinsic_defs: map::HashMap(),
       freevars: freevars,
-      tcache: ast_util::new_def_hash(),
+      tcache: HashMap(),
       rcache: mk_rcache(),
-      ccache: ast_util::new_def_hash(),
+      ccache: HashMap(),
       short_names_cache: new_ty_hash(),
       needs_drop_cache: new_ty_hash(),
       needs_unwind_cleanup_cache: new_ty_hash(),
       kind_cache: new_ty_hash(),
-      ast_ty_to_ty_cache: map::HashMap(),
-      enum_var_cache: new_def_hash(),
-      trait_method_cache: new_def_hash(),
-      ty_param_bounds: map::int_hash(),
-      inferred_modes: map::int_hash(),
-      adjustments: map::int_hash(),
+      ast_ty_to_ty_cache: HashMap(),
+      enum_var_cache: HashMap(),
+      trait_method_cache: HashMap(),
+      ty_param_bounds: HashMap(),
+      inferred_modes: HashMap(),
+      adjustments: HashMap(),
       normalized_cache: new_ty_hash(),
       lang_items: move lang_items}
 }
diff --git a/src/rustc/middle/typeck.rs b/src/rustc/middle/typeck.rs
index b9218c064f4..20c12c25cca 100644
--- a/src/rustc/middle/typeck.rs
+++ b/src/rustc/middle/typeck.rs
@@ -55,7 +55,7 @@ use middle::ty::{arg, field, node_type_table, mk_nil, ty_param_bounds_and_ty};
 use middle::ty::{vstore_uniq};
 use std::smallintmap;
 use std::map;
-use std::map::{HashMap, int_hash};
+use std::map::HashMap;
 use std::serialization::{serialize_uint, deserialize_uint};
 use syntax::print::pprust::*;
 use util::ppaux::{ty_to_str, tys_to_str, region_to_str,
@@ -329,10 +329,10 @@ fn check_crate(tcx: ty::ctxt,
             -> (method_map, vtable_map) {
 
     let ccx = @crate_ctxt_({trait_map: trait_map,
-                            method_map: std::map::int_hash(),
-                            vtable_map: std::map::int_hash(),
+                            method_map: std::map::HashMap(),
+                            vtable_map: std::map::HashMap(),
                             coherence_info: @coherence::CoherenceInfo(),
-                            provided_methods_map: std::map::int_hash(),
+                            provided_methods_map: std::map::HashMap(),
                             tcx: tcx});
     collect::collect_item_types(ccx, crate);
     coherence::check_coherence(ccx, crate);
diff --git a/src/rustc/middle/typeck/check.rs b/src/rustc/middle/typeck/check.rs
index 6c1a6d8d5b8..5a078210276 100644
--- a/src/rustc/middle/typeck/check.rs
+++ b/src/rustc/middle/typeck/check.rs
@@ -79,7 +79,7 @@ use result::{Result, Ok, Err};
 use syntax::print::pprust;
 use syntax::parse::token::special_idents;
 
-use std::map::{str_hash, uint_hash};
+use std::map::HashMap;
 
 type self_info = {
     self_ty: ty::t,
@@ -141,10 +141,10 @@ struct fn_ctxt {
 fn blank_inherited(ccx: @crate_ctxt) -> @inherited {
     @inherited {
         infcx: infer::new_infer_ctxt(ccx.tcx),
-        locals: int_hash(),
-        node_types: map::int_hash(),
-        node_type_substs: map::int_hash(),
-        adjustments: map::int_hash()
+        locals: HashMap(),
+        node_types: map::HashMap(),
+        node_type_substs: map::HashMap(),
+        adjustments: map::HashMap()
     }
 }
 
@@ -425,7 +425,7 @@ fn check_method(ccx: @crate_ctxt, method: @ast::method,
 
 fn check_no_duplicate_fields(tcx: ty::ctxt, fields:
                              ~[(ast::ident, span)]) {
-    let field_names = uint_hash();
+    let field_names = HashMap();
 
     for fields.each |p| {
         let (id, sp) = p;
@@ -1963,7 +1963,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
 
         // Look up the class fields and build up a map.
         let class_fields = ty::lookup_class_fields(tcx, class_id);
-        let class_field_map = uint_hash();
+        let class_field_map = HashMap();
         let mut fields_found = 0;
         for class_fields.each |field| {
             // XXX: Check visibility here.
diff --git a/src/rustc/middle/typeck/check/alt.rs b/src/rustc/middle/typeck/check/alt.rs
index b0cd3157b35..cd454c54b2c 100644
--- a/src/rustc/middle/typeck/check/alt.rs
+++ b/src/rustc/middle/typeck/check/alt.rs
@@ -349,13 +349,13 @@ fn check_pat(pcx: pat_ctxt, pat: @ast::pat, expected: ty::t) {
         }
 
         // Index the class fields.
-        let field_map = std::map::uint_hash();
+        let field_map = std::map::HashMap();
         for class_fields.eachi |i, class_field| {
             field_map.insert(class_field.ident, i);
         }
 
         // Typecheck each field.
-        let found_fields = std::map::uint_hash();
+        let found_fields = std::map::HashMap();
         for fields.each |field| {
             match field_map.find(field.ident) {
                 Some(index) => {
diff --git a/src/rustc/middle/typeck/check/method.rs b/src/rustc/middle/typeck/check/method.rs
index b37e8d54789..edb157a6059 100644
--- a/src/rustc/middle/typeck/check/method.rs
+++ b/src/rustc/middle/typeck/check/method.rs
@@ -76,7 +76,7 @@ use syntax::ast::{def_id, sty_by_ref, sty_value, sty_region, sty_box,
                   m_const, m_mutbl, m_imm};
 use syntax::ast_map;
 use syntax::ast_map::node_id_to_str;
-use syntax::ast_util::{dummy_sp, new_def_hash};
+use syntax::ast_util::dummy_sp;
 use dvec::DVec;
 
 fn lookup(
@@ -98,7 +98,7 @@ fn lookup(
         callee_id: callee_id,
         m_name: m_name,
         supplied_tps: supplied_tps,
-        impl_dups: new_def_hash(),
+        impl_dups: HashMap(),
         inherent_candidates: DVec(),
         extension_candidates: DVec()
     };
diff --git a/src/rustc/middle/typeck/check/vtable.rs b/src/rustc/middle/typeck/check/vtable.rs
index f3aae4dad3d..08564ff4151 100644
--- a/src/rustc/middle/typeck/check/vtable.rs
+++ b/src/rustc/middle/typeck/check/vtable.rs
@@ -1,7 +1,6 @@
 use check::{fn_ctxt, impl_self_ty};
 use infer::{resolve_type, resolve_and_force_all_but_regions,
                fixup_err_to_str};
-use ast_util::new_def_hash;
 use syntax::print::pprust;
 use result::{Result, Ok, Err};
 use util::common::indenter;
@@ -177,7 +176,7 @@ fn lookup_vtable(fcx: @fn_ctxt,
         _ => {
             let mut found = ~[];
 
-            let mut impls_seen = new_def_hash();
+            let mut impls_seen = HashMap();
 
             match fcx.ccx.coherence_info.extension_methods.find(trait_id) {
                 None => {
diff --git a/src/rustc/middle/typeck/coherence.rs b/src/rustc/middle/typeck/coherence.rs
index 1e3e8a3fc14..e4ffc6c17c3 100644
--- a/src/rustc/middle/typeck/coherence.rs
+++ b/src/rustc/middle/typeck/coherence.rs
@@ -23,7 +23,7 @@ use syntax::ast::{item_foreign_mod, item_impl, item_mac, item_mod};
 use syntax::ast::{item_trait, item_ty, local_crate, method, node_id};
 use syntax::ast::{trait_ref};
 use syntax::ast_map::node_item;
-use syntax::ast_util::{def_id_of_def, dummy_sp, new_def_hash};
+use syntax::ast_util::{def_id_of_def, dummy_sp};
 use syntax::codemap::span;
 use syntax::visit::{default_simple_visitor, default_visitor};
 use syntax::visit::{mk_simple_visitor, mk_vt, visit_crate, visit_item};
@@ -32,7 +32,7 @@ use util::ppaux::ty_to_str;
 
 use dvec::DVec;
 use result::Ok;
-use std::map::{HashMap, int_hash};
+use std::map::HashMap;
 use uint::range;
 use vec::{len, push};
 
@@ -130,8 +130,8 @@ struct CoherenceInfo {
 
 fn CoherenceInfo() -> CoherenceInfo {
     CoherenceInfo {
-        inherent_methods: new_def_hash(),
-        extension_methods: new_def_hash()
+        inherent_methods: HashMap(),
+        extension_methods: HashMap()
     }
 }
 
@@ -140,8 +140,8 @@ fn CoherenceChecker(crate_context: @crate_ctxt) -> CoherenceChecker {
         crate_context: crate_context,
         inference_context: new_infer_ctxt(crate_context.tcx),
 
-        base_type_def_ids: new_def_hash(),
-        privileged_implementations: int_hash()
+        base_type_def_ids: HashMap(),
+        privileged_implementations: HashMap()
     }
 }
 
@@ -728,7 +728,7 @@ impl CoherenceChecker {
     }
 
     fn add_external_crates() {
-        let impls_seen = new_def_hash();
+        let impls_seen = HashMap();
 
         let crate_store = self.crate_context.tcx.sess.cstore;
         do iter_crate_data(crate_store) |crate_number, _crate_metadata| {
diff --git a/src/rustc/middle/typeck/infer/region_var_bindings.rs b/src/rustc/middle/typeck/infer/region_var_bindings.rs
index 7e736925890..02e170d575e 100644
--- a/src/rustc/middle/typeck/infer/region_var_bindings.rs
+++ b/src/rustc/middle/typeck/infer/region_var_bindings.rs
@@ -308,7 +308,7 @@ because `&x` was created alone, but is relatable to `&A`.
 use dvec::DVec;
 use result::Result;
 use result::{Ok, Err};
-use std::map::{HashMap, uint_hash};
+use std::map::HashMap;
 use std::cell::{Cell, empty_cell};
 use std::list::{List, Nil, Cons};
 
@@ -1188,7 +1188,7 @@ impl RegionVarBindings {
     fn collect_concrete_regions(graph: &Graph,
                                 orig_node_idx: RegionVid,
                                 dir: Direction) -> ~[SpannedRegion] {
-        let set = uint_hash();
+        let set = HashMap();
         let mut stack = ~[orig_node_idx];
         set.insert(*orig_node_idx, ());
         let mut result = ~[];