diff --git a/src/cargo/cargo.rs b/src/cargo/cargo.rs index c188b9d9443..a4816fedf97 100644 --- a/src/cargo/cargo.rs +++ b/src/cargo/cargo.rs @@ -16,7 +16,6 @@ import io::writer_util; import std::json; import result; import std::map; -import std::map::hashmap; import std::os; import std::run; import str; diff --git a/src/libstd/json.rs b/src/libstd/json.rs index 26e4cc3165e..51069cf9729 100644 --- a/src/libstd/json.rs +++ b/src/libstd/json.rs @@ -5,7 +5,6 @@ import result::{ok, err}; import io; import io::{reader_util, writer_util}; import map; -import map::hashmap; export json; export error; @@ -37,7 +36,7 @@ enum json { /* Variant: list */ list([json]), /* Variant: dict */ - dict(map::hashmap), + dict(map::map), /* Variant: null */ null, } diff --git a/src/libstd/map.rs b/src/libstd/map.rs index 0511b82b5ba..c2320e93f29 100644 --- a/src/libstd/map.rs +++ b/src/libstd/map.rs @@ -4,10 +4,6 @@ Module: map A map type */ -import chained::hashmap; -export hashmap, hashfn, eqfn, set, map, chained, mk_hashmap, new_str_hash; -export new_bytes_hash, new_int_hash, new_uint_hash, set_add; - /* Section: Types */ /* @@ -27,13 +23,14 @@ Equality type eqfn = fn@(K, K) -> bool; /* -Type: set +Type: hashset -A convenience type to treat a hashmap as a set +A convenience type to treat a map as a set */ -type set = hashmap; +type set = map; -type hashmap = chained::t; +// Temporary alias to make migration easier +type hashmap = map; /* IFace: map @@ -106,7 +103,8 @@ iface map { } // FIXME: package this up and export it as a datatype usable for -// external code that doesn't want to pay the cost of a box. +// external code that doesn't want to pay the cost of a box and vtable +// lookups. mod chained { type entry = { hash: uint, @@ -120,8 +118,8 @@ mod chained { absent } - type t = @{ - mutable count: uint, + type t = { + mutable size: uint, mutable chains: [mutable chain], hasher: hashfn, eqer: eqfn @@ -187,7 +185,7 @@ mod chained { let hash = tbl.hasher(k); alt search_tbl(tbl, k, hash) { not_found { - tbl.count += 1u; + tbl.size += 1u; let idx = hash % vec::len(tbl.chains); let old_chain = tbl.chains[idx]; tbl.chains[idx] = present(@{ @@ -231,13 +229,13 @@ mod chained { } found_first(idx, entry) { - tbl.count -= 1u; + tbl.size -= 1u; tbl.chains[idx] = entry.next; ret core::option::some(entry.value); } found_after(eprev, entry) { - tbl.count -= 1u; + tbl.size -= 1u; eprev.next = entry.next; ret core::option::some(entry.value); } @@ -293,12 +291,12 @@ mod chained { } } - impl hashmap of map for t { - fn size() -> uint { self.count } + impl of map for t { + fn size() -> uint { self.size } fn insert(k: K, v: V) -> bool { let nchains = vec::len(self.chains); - let load = {num: (self.count + 1u) as int, den: nchains as int}; + let load = {num: (self.size + 1u) as int, den: nchains as int}; // Structural consts would be nice. This is a const 3/4 // load factor that we compare against. if !util::rational_leq(load, {num:3, den:4}) { rehash(self); } @@ -320,13 +318,13 @@ mod chained { fn values(blk: fn(V)) { items(self) { |_k, v| blk(v) } } } - fn mk(hasher: hashfn, eqer: eqfn) -> t { + fn mk(hasher: hashfn, eqer: eqfn) -> map { let initial_capacity: uint = 32u; // 2^5 - let slf: t = @{mutable count: 0u, - mutable chains: chains(initial_capacity), - hasher: hasher, - eqer: eqer}; - slf + let slf: t = {mutable size: 0u, + mutable chains: chains(initial_capacity), + hasher: hasher, + eqer: eqer}; + slf as map:: } } @@ -341,7 +339,7 @@ hasher - The hash function for key type K eqer - The equality function for key type K */ fn mk_hashmap(hasher: hashfn, eqer: eqfn) - -> hashmap { + -> map { chained::mk(hasher, eqer) } @@ -350,7 +348,7 @@ Function: new_str_hash Construct a hashmap for string keys */ -fn new_str_hash() -> hashmap { +fn new_str_hash() -> map { ret mk_hashmap(str::hash, str::eq); } @@ -359,7 +357,7 @@ Function: new_bytes_hash Construct a hashmap for byte string keys */ -fn new_bytes_hash() -> hashmap<[u8], V> { +fn new_bytes_hash() -> map<[u8], V> { ret mk_hashmap(vec::u8::hash, vec::u8::eq); } @@ -368,7 +366,7 @@ Function: new_int_hash Construct a hashmap for int keys */ -fn new_int_hash() -> hashmap { +fn new_int_hash() -> map { fn hash_int(&&x: int) -> uint { int::hash(x) } fn eq_int(&&a: int, &&b: int) -> bool { ret a == b; } ret mk_hashmap(hash_int, eq_int); @@ -379,7 +377,7 @@ Function: new_uint_hash Construct a hashmap for uint keys */ -fn new_uint_hash() -> hashmap { +fn new_uint_hash() -> map { fn hash_uint(&&x: uint) -> uint { uint::hash(x) } fn eq_uint(&&a: uint, &&b: uint) -> bool { ret a == b; } ret mk_hashmap(hash_uint, eq_uint); diff --git a/src/libstd/uv.rs b/src/libstd/uv.rs index 9991d68b295..875656d3a22 100644 --- a/src/libstd/uv.rs +++ b/src/libstd/uv.rs @@ -1,4 +1,3 @@ -import map::hashmap; export loop_new, loop_delete, run, close, run_in_bg; export async_init, async_send; export timer_init, timer_start, timer_stop; @@ -130,17 +129,17 @@ fn loop_new() -> uv_loop unsafe { process_operation); // all state goes here - let handles: map::hashmap<[u8], *ctypes::void> = + let handles: map::map<[u8], *ctypes::void> = map::new_bytes_hash(); - let id_to_handle: map::hashmap<[u8], uv_handle> = + let id_to_handle: map::map<[u8], uv_handle> = map::new_bytes_hash(); - let after_cbs: map::hashmap<[u8], fn~(uv_handle)> = + let after_cbs: map::map<[u8], fn~(uv_handle)> = map::new_bytes_hash(); - let close_callbacks: map::hashmap<[u8], fn~()> = + let close_callbacks: map::map<[u8], fn~()> = map::new_bytes_hash(); - let async_cbs: map::hashmap<[u8], fn~(uv_handle)> = + let async_cbs: map::map<[u8], fn~(uv_handle)> = map::new_bytes_hash(); - let timer_cbs: map::hashmap<[u8], fn~(uv_handle)> = + let timer_cbs: map::map<[u8], fn~(uv_handle)> = map::new_bytes_hash(); // the main loop that this task blocks on. diff --git a/src/rustc/back/link.rs b/src/rustc/back/link.rs index 1889497957c..63062986363 100644 --- a/src/rustc/back/link.rs +++ b/src/rustc/back/link.rs @@ -7,7 +7,6 @@ import middle::ty; import metadata::{encoder, cstore}; import middle::trans::common::crate_ctxt; import std::fs; -import std::map::hashmap; import std::run; import std::sha1::sha1; import syntax::ast; diff --git a/src/rustc/back/rpath.rs b/src/rustc/back/rpath.rs index 8ecb48f86ea..cc74efa82cf 100644 --- a/src/rustc/back/rpath.rs +++ b/src/rustc/back/rpath.rs @@ -1,5 +1,4 @@ import std::{os, fs, os_fs, map}; -import std::map::hashmap; import metadata::cstore; import driver::session; import util::filesearch; diff --git a/src/rustc/front/attr.rs b/src/rustc/front/attr.rs index 834d0957ca5..4f4fecbe409 100644 --- a/src/rustc/front/attr.rs +++ b/src/rustc/front/attr.rs @@ -1,7 +1,6 @@ // Functions dealing with attributes and meta_items import std::map; -import std::map::hashmap; import syntax::{ast, ast_util}; import driver::session::session; diff --git a/src/rustc/lib/llvm.rs b/src/rustc/lib/llvm.rs index 83b45583a61..2dc2945d8de 100644 --- a/src/rustc/lib/llvm.rs +++ b/src/rustc/lib/llvm.rs @@ -1,5 +1,4 @@ import str::sbuf; -import std::map::hashmap; import ctypes::{c_int, c_uint, unsigned, longlong, ulonglong}; diff --git a/src/rustc/metadata/astencode.rs b/src/rustc/metadata/astencode.rs index d3d8593b654..87e2138a247 100644 --- a/src/rustc/metadata/astencode.rs +++ b/src/rustc/metadata/astencode.rs @@ -4,15 +4,15 @@ import syntax::visit; import syntax::ast_util; import syntax::ast_util::inlined_item_methods; import syntax::codemap::span; +import std::map::map; +import std::smallintmap::map; import std::ebml; import std::ebml::writer; -import std::map::hashmap; import std::serialization; import std::serialization::serializer; import std::serialization::deserializer; import std::serialization::serializer_helpers; import std::serialization::deserializer_helpers; -import std::smallintmap::map; import middle::trans::common::maps; import middle::{ty, typeck, last_use, ast_map}; import middle::typeck::method_origin; @@ -922,4 +922,4 @@ fn test_more() { ret z; } }); -} +} \ No newline at end of file diff --git a/src/rustc/metadata/csearch.rs b/src/rustc/metadata/csearch.rs index 0da50704635..dc41753d782 100644 --- a/src/rustc/metadata/csearch.rs +++ b/src/rustc/metadata/csearch.rs @@ -6,7 +6,6 @@ import middle::{ty, ast_map}; import option::{some, none}; import driver::session; import middle::trans::common::maps; -import std::map::hashmap; export get_symbol; export get_type_param_count; diff --git a/src/rustc/metadata/cstore.rs b/src/rustc/metadata/cstore.rs index 24670e1394e..e9dd1a010c5 100644 --- a/src/rustc/metadata/cstore.rs +++ b/src/rustc/metadata/cstore.rs @@ -2,7 +2,6 @@ // crates and libraries import std::map; -import std::map::hashmap; import syntax::ast; import util::common::*; diff --git a/src/rustc/metadata/decoder.rs b/src/rustc/metadata/decoder.rs index c43ed20b2fc..196789ee58c 100644 --- a/src/rustc/metadata/decoder.rs +++ b/src/rustc/metadata/decoder.rs @@ -1,7 +1,6 @@ // Decoding metadata from a single crate's metadata import std::{ebml, map, io}; -import std::map::hashmap; import io::writer_util; import syntax::{ast, ast_util}; import driver::session::session; diff --git a/src/rustc/metadata/encoder.rs b/src/rustc/metadata/encoder.rs index c2c0cbc9150..ab6a8dea04c 100644 --- a/src/rustc/metadata/encoder.rs +++ b/src/rustc/metadata/encoder.rs @@ -1,7 +1,6 @@ // Metadata encoding import std::{io, ebml, map, list}; -import std::map::hashmap; import io::writer_util; import ebml::writer; import syntax::ast::*; diff --git a/src/rustc/metadata/reachable.rs b/src/rustc/metadata/reachable.rs index dad1f9b7039..e85d4098fde 100644 --- a/src/rustc/metadata/reachable.rs +++ b/src/rustc/metadata/reachable.rs @@ -10,11 +10,10 @@ import syntax::ast::*; import syntax::visit; import syntax::ast_util::def_id_of_def; import front::attr; -import std::map::hashmap; export map, find_reachable; -type map = std::map::hashmap; +type map = std::map::map; type ctx = {ccx: middle::trans::common::crate_ctxt, rmap: map}; diff --git a/src/rustc/metadata/tydecode.rs b/src/rustc/metadata/tydecode.rs index 284c38a6a3e..5d97777c0fb 100644 --- a/src/rustc/metadata/tydecode.rs +++ b/src/rustc/metadata/tydecode.rs @@ -5,7 +5,6 @@ import syntax::ast::*; import syntax::ast_util; import syntax::ast_util::respan; import middle::ty; -import std::map::hashmap; export parse_ty_data, parse_def_id; export parse_bounds_data; diff --git a/src/rustc/middle/alias.rs b/src/rustc/middle/alias.rs index cc5a68e7b11..cb0785b4df1 100644 --- a/src/rustc/middle/alias.rs +++ b/src/rustc/middle/alias.rs @@ -5,7 +5,6 @@ import syntax::codemap::span; import syntax::visit; import visit::vt; import std::list; -import std::map::hashmap; import std::util::unreachable; import option::is_none; import list::list; diff --git a/src/rustc/middle/ast_map.rs b/src/rustc/middle/ast_map.rs index c39686b0d30..3ff8a96f287 100644 --- a/src/rustc/middle/ast_map.rs +++ b/src/rustc/middle/ast_map.rs @@ -1,5 +1,4 @@ import std::map; -import std::map::hashmap; import syntax::ast::*; import syntax::ast_util; import syntax::ast_util::inlined_item_methods; @@ -36,7 +35,7 @@ enum ast_node { node_res_ctor(@item), } -type map = std::map::hashmap; +type map = std::map::map; type ctx = {map: map, mutable path: path, mutable local_id: uint}; type vt = visit::vt; diff --git a/src/rustc/middle/capture.rs b/src/rustc/middle/capture.rs index 7da4edfc956..3ec56c62077 100644 --- a/src/rustc/middle/capture.rs +++ b/src/rustc/middle/capture.rs @@ -1,7 +1,6 @@ import syntax::{ast, ast_util}; import driver::session::session; import std::map; -import std::map::hashmap; export capture_mode; export capture_var; diff --git a/src/rustc/middle/check_alt.rs b/src/rustc/middle/check_alt.rs index a52669b65d7..6d55aed095e 100644 --- a/src/rustc/middle/check_alt.rs +++ b/src/rustc/middle/check_alt.rs @@ -8,7 +8,6 @@ import syntax::visit; import driver::session::session; import middle::ty; import middle::ty::*; -import std::map::hashmap; fn check_crate(tcx: ty::ctxt, crate: @crate) { visit::visit_crate(*crate, (), visit::mk_vt(@{ diff --git a/src/rustc/middle/check_const.rs b/src/rustc/middle/check_const.rs index c36aeaede76..d04abffb320 100644 --- a/src/rustc/middle/check_const.rs +++ b/src/rustc/middle/check_const.rs @@ -1,7 +1,6 @@ import syntax::ast::*; import syntax::{visit, ast_util}; import driver::session::session; -import std::map::hashmap; fn check_crate(sess: session, crate: @crate, method_map: typeck::method_map) { visit::visit_crate(*crate, false, visit::mk_vt(@{ diff --git a/src/rustc/middle/fn_usage.rs b/src/rustc/middle/fn_usage.rs index 332b316b986..c415f5deb05 100644 --- a/src/rustc/middle/fn_usage.rs +++ b/src/rustc/middle/fn_usage.rs @@ -1,4 +1,3 @@ -import std::map::hashmap; import syntax::ast; import syntax::visit; import syntax::print::pprust::expr_to_str; diff --git a/src/rustc/middle/kind.rs b/src/rustc/middle/kind.rs index 9672848f4c8..e7999f04cad 100644 --- a/src/rustc/middle/kind.rs +++ b/src/rustc/middle/kind.rs @@ -3,7 +3,6 @@ import syntax::ast::*; import syntax::codemap::span; import ty::{kind, kind_copyable, kind_sendable, kind_noncopyable}; import driver::session::session; -import std::map::hashmap; // Kind analysis pass. There are three kinds: // diff --git a/src/rustc/middle/last_use.rs b/src/rustc/middle/last_use.rs index 60954e25c91..12ffdfccb41 100644 --- a/src/rustc/middle/last_use.rs +++ b/src/rustc/middle/last_use.rs @@ -4,7 +4,6 @@ import syntax::codemap::span; import std::list::{is_not_empty, list, nil, cons, tail}; import std::util::unreachable; import std::list; -import std::map::hashmap; // Last use analysis pass. // diff --git a/src/rustc/middle/lint.rs b/src/rustc/middle/lint.rs index 65b570e35a2..f46a50ea4a1 100644 --- a/src/rustc/middle/lint.rs +++ b/src/rustc/middle/lint.rs @@ -3,7 +3,6 @@ import middle::ty::ctxt; import syntax::{ast, visit}; import front::attr; import std::io; -import std::map::hashmap; import io::writer_util; enum option { diff --git a/src/rustc/middle/mutbl.rs b/src/rustc/middle/mutbl.rs index dacf6e5ca98..bf51f7d3764 100644 --- a/src/rustc/middle/mutbl.rs +++ b/src/rustc/middle/mutbl.rs @@ -2,7 +2,6 @@ import syntax::ast::*; import syntax::visit; import syntax::ast_util; import driver::session::session; -import std::map::hashmap; enum deref_t { unbox(bool), field, index, } diff --git a/src/rustc/middle/pat_util.rs b/src/rustc/middle/pat_util.rs index 08aa720be68..1a6856e36bf 100644 --- a/src/rustc/middle/pat_util.rs +++ b/src/rustc/middle/pat_util.rs @@ -4,7 +4,6 @@ import syntax::ast_util::respan; import syntax::fold; import syntax::fold::*; import syntax::codemap::span; -import std::map::hashmap; export walk_pat; export pat_binding_ids, pat_bindings, pat_id_map; diff --git a/src/rustc/middle/trans/alt.rs b/src/rustc/middle/trans/alt.rs index 169b74b7a25..6ada125be07 100644 --- a/src/rustc/middle/trans/alt.rs +++ b/src/rustc/middle/trans/alt.rs @@ -12,7 +12,6 @@ import syntax::codemap::span; import syntax::print::pprust::pat_to_str; import back::abi; import resolve::def_map; -import std::map::hashmap; import common::*; diff --git a/src/rustc/middle/trans/closure.rs b/src/rustc/middle/trans/closure.rs index ceadecb5c83..f11dbae04b8 100644 --- a/src/rustc/middle/trans/closure.rs +++ b/src/rustc/middle/trans/closure.rs @@ -18,7 +18,6 @@ import util::ppaux::ty_to_str; import shape::{size_of}; import ast_map::{path, path_mod, path_name}; import driver::session::session; -import std::map::hashmap; // ___Good to know (tm)__________________________________________________ // diff --git a/src/rustc/middle/trans/impl.rs b/src/rustc/middle/trans/impl.rs index 86522ba9934..e4e1859e87d 100644 --- a/src/rustc/middle/trans/impl.rs +++ b/src/rustc/middle/trans/impl.rs @@ -11,7 +11,6 @@ import lib::llvm::llvm; import lib::llvm::{ValueRef, TypeRef}; import lib::llvm::llvm::LLVMGetParam; import ast_map::{path, path_mod, path_name}; -import std::map::hashmap; // Translation functionality related to impls and ifaces // diff --git a/src/rustc/middle/trans/native.rs b/src/rustc/middle/trans/native.rs index dff2a207cd0..26621158f77 100644 --- a/src/rustc/middle/trans/native.rs +++ b/src/rustc/middle/trans/native.rs @@ -9,7 +9,6 @@ import common::*; import build::*; import base::*; import type_of::*; -import std::map::hashmap; export link_name, trans_native_mod, register_crust_fn, trans_crust_fn; @@ -359,4 +358,4 @@ fn register_crust_fn(ccx: crate_ctxt, sp: span, let llfty = T_fn(llargtys, llretty); register_fn_fuller(ccx, sp, path, "crust fn", node_id, t, lib::llvm::CCallConv, llfty) -} +} \ No newline at end of file diff --git a/src/rustc/middle/trans/type_of.rs b/src/rustc/middle/trans/type_of.rs index 89de5e249a2..e613fdf3cd9 100644 --- a/src/rustc/middle/trans/type_of.rs +++ b/src/rustc/middle/trans/type_of.rs @@ -3,7 +3,6 @@ import lib::llvm::{TypeRef}; import syntax::ast; import lib::llvm::llvm; import driver::session::session; -import std::map::hashmap; import ty::*; diff --git a/src/rustc/middle/tstate/auxiliary.rs b/src/rustc/middle/tstate/auxiliary.rs index e49748f6b65..89fce0ddb70 100644 --- a/src/rustc/middle/tstate/auxiliary.rs +++ b/src/rustc/middle/tstate/auxiliary.rs @@ -4,7 +4,7 @@ import syntax::ast::*; import syntax::ast_util::*; import syntax::{visit, codemap}; import codemap::span; -import std::map::{hashmap, new_int_hash}; +import std::map::{new_int_hash}; import syntax::print::pprust::path_to_str; import tstate::ann::{pre_and_post, pre_and_post_state, empty_ann, prestate, poststate, precond, postcond, diff --git a/src/rustc/middle/tstate/bitvectors.rs b/src/rustc/middle/tstate/bitvectors.rs index 7433da333ac..6acb23d906a 100644 --- a/src/rustc/middle/tstate/bitvectors.rs +++ b/src/rustc/middle/tstate/bitvectors.rs @@ -12,7 +12,6 @@ import tstate::ann::{pre_and_post, precond, postcond, prestate, poststate, import tritv::*; import util::common::*; import driver::session::session; -import std::map::hashmap; fn bit_num(fcx: fn_ctxt, c: tsconstr) -> uint { let d = tsconstr_to_def_id(c); diff --git a/src/rustc/middle/tstate/ck.rs b/src/rustc/middle/tstate/ck.rs index 56001460f8b..357d43edc8e 100644 --- a/src/rustc/middle/tstate/ck.rs +++ b/src/rustc/middle/tstate/ck.rs @@ -14,7 +14,6 @@ import collect_locals::mk_f_to_fn_info; import pre_post_conditions::fn_pre_post; import states::find_pre_post_state_fn; import driver::session::session; -import std::map::hashmap; fn check_unused_vars(fcx: fn_ctxt) { diff --git a/src/rustc/middle/tstate/collect_locals.rs b/src/rustc/middle/tstate/collect_locals.rs index 79a085b892e..9b39814e141 100644 --- a/src/rustc/middle/tstate/collect_locals.rs +++ b/src/rustc/middle/tstate/collect_locals.rs @@ -8,7 +8,6 @@ import syntax::codemap::span; import syntax::ast_util::respan; import driver::session::session; import aux::*; -import std::map::hashmap; type ctxt = {cs: @mutable [sp_constr], tcx: ty::ctxt}; diff --git a/src/rustc/middle/tstate/pre_post_conditions.rs b/src/rustc/middle/tstate/pre_post_conditions.rs index 3fe6f82f42e..6c80234a54b 100644 --- a/src/rustc/middle/tstate/pre_post_conditions.rs +++ b/src/rustc/middle/tstate/pre_post_conditions.rs @@ -13,7 +13,6 @@ import util::common::{new_def_hash, log_expr, field_exprs, has_nonlocal_exits, log_stmt}; import syntax::codemap::span; import driver::session::session; -import std::map::hashmap; fn find_pre_post_mod(_m: _mod) -> _mod { #debug("implement find_pre_post_mod!"); diff --git a/src/rustc/middle/tstate/states.rs b/src/rustc/middle/tstate/states.rs index c7eebf317af..adb86248047 100644 --- a/src/rustc/middle/tstate/states.rs +++ b/src/rustc/middle/tstate/states.rs @@ -10,7 +10,6 @@ import syntax::codemap::span; import middle::ty::{expr_ty, type_is_bot}; import util::common::*; import driver::session::session; -import std::map::hashmap; fn forbid_upvar(fcx: fn_ctxt, rhs_id: node_id, sp: span, t: oper_type) { alt t { diff --git a/src/rustdoc/astsrv.rs b/src/rustdoc/astsrv.rs index 718e8af35b9..1d689184f59 100644 --- a/src/rustdoc/astsrv.rs +++ b/src/rustdoc/astsrv.rs @@ -7,7 +7,6 @@ Rustdoc from its non-sendableness." )]; -import std::map::hashmap; import rustc::driver::session; import rustc::driver::driver; import rustc::driver::diagnostic; diff --git a/src/rustdoc/attr_pass.rs b/src/rustdoc/attr_pass.rs index 70572fad825..237a8d7de77 100644 --- a/src/rustdoc/attr_pass.rs +++ b/src/rustdoc/attr_pass.rs @@ -8,7 +8,6 @@ import rustc::syntax::ast; import rustc::middle::ast_map; -import std::map::hashmap; export mk_pass; @@ -475,4 +474,4 @@ mod test { run(srv, doc) } } -} +} \ No newline at end of file diff --git a/src/rustdoc/prune_unexported_pass.rs b/src/rustdoc/prune_unexported_pass.rs index 80fe5732d9d..fcd24bebbb4 100644 --- a/src/rustdoc/prune_unexported_pass.rs +++ b/src/rustdoc/prune_unexported_pass.rs @@ -3,7 +3,6 @@ import rustc::syntax::ast; import rustc::syntax::ast_util; import rustc::middle::ast_map; -import std::map::hashmap; export mk_pass; @@ -254,4 +253,4 @@ mod test { run(srv, doc) } } -} +} \ No newline at end of file diff --git a/src/rustdoc/reexport_pass.rs b/src/rustdoc/reexport_pass.rs index 99f2e19149e..ddbbf3d96d4 100644 --- a/src/rustdoc/reexport_pass.rs +++ b/src/rustdoc/reexport_pass.rs @@ -1,7 +1,6 @@ #[doc = "Finds docs for reexported items and duplicates them"]; import std::map; -import std::map::hashmap; import rustc::syntax::ast; import rustc::syntax::ast_util; import rustc::util::common; diff --git a/src/rustdoc/tystr_pass.rs b/src/rustdoc/tystr_pass.rs index 5e630ac2ade..a7af2bb13ba 100644 --- a/src/rustdoc/tystr_pass.rs +++ b/src/rustdoc/tystr_pass.rs @@ -4,7 +4,6 @@ import rustc::syntax::ast; import rustc::syntax::print::pprust; import rustc::middle::ast_map; -import std::map::hashmap; export mk_pass; diff --git a/src/serializer/serializer.rs b/src/serializer/serializer.rs index 06684474c47..90db74c4039 100644 --- a/src/serializer/serializer.rs +++ b/src/serializer/serializer.rs @@ -50,7 +50,7 @@ type ast_pat = str; type ast_ty = str; type ast_item = str; -type tp_map = hashmap; +type tp_map = map; type serialize_ctx = { crate: @ast::crate, @@ -519,4 +519,4 @@ fn main(argv: [str]) { vec::iter(copy sctx.item_fns) {|item| stdout.write_str(#fmt["%s\n", item]) } -} +} \ No newline at end of file diff --git a/src/test/bench/shootout-mandelbrot.rs b/src/test/bench/shootout-mandelbrot.rs index 6cf0d3e7ce3..984e8d78a18 100644 --- a/src/test/bench/shootout-mandelbrot.rs +++ b/src/test/bench/shootout-mandelbrot.rs @@ -14,7 +14,6 @@ use std; import std::io::writer_util; -import std::map::hashmap; type cmplx = {re: f64, im: f64}; type line = {i: uint, b: [u8]}; diff --git a/src/test/bench/task-perf-word-count.rs b/src/test/bench/task-perf-word-count.rs index d800b5e9a64..a69a2d54c6f 100644 --- a/src/test/bench/task-perf-word-count.rs +++ b/src/test/bench/task-perf-word-count.rs @@ -13,7 +13,6 @@ use std; import option = option; import option::{some, none}; import std::{map, io, time}; -import std::map::hashmap; import io::reader_util; import comm::chan; diff --git a/src/test/compile-fail/map-types.rs b/src/test/compile-fail/map-types.rs index 76c0807e69b..f0c8bdf7b52 100644 --- a/src/test/compile-fail/map-types.rs +++ b/src/test/compile-fail/map-types.rs @@ -1,12 +1,10 @@ use std; import std::map; -import std::map::hashmap; import std::map::map; // Test that iface types printed in error msgs include the type arguments. fn main() { - let x: map = map::new_str_hash::() as map::; - let y: map = x; + let x: map = map::new_str_hash::(); //!^ ERROR mismatched types: expected `std::map::map` -} +} \ No newline at end of file diff --git a/src/test/run-fail/unwind-misc-1.rs b/src/test/run-fail/unwind-misc-1.rs index 532a911bd42..365a1cbdcc6 100644 --- a/src/test/run-fail/unwind-misc-1.rs +++ b/src/test/run-fail/unwind-misc-1.rs @@ -2,7 +2,6 @@ use std; import std::map; -import std::map::hashmap; import uint; fn main() { @@ -22,4 +21,4 @@ fn main() { map.insert(arr, arr + [@"value stuff"]); } map.insert([@"boom"], []); -} +} \ No newline at end of file diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs index 10f7388f720..bc16c319374 100644 --- a/src/test/run-pass/hashmap-memory.rs +++ b/src/test/run-pass/hashmap-memory.rs @@ -12,7 +12,6 @@ import option::none; import str; import vec; import std::map; -import std::map::hashmap; import task; import comm::chan; import comm::port; diff --git a/src/test/run-pass/issue-1696.rs b/src/test/run-pass/issue-1696.rs index 249f64d445d..f55e2fb8541 100644 --- a/src/test/run-pass/issue-1696.rs +++ b/src/test/run-pass/issue-1696.rs @@ -1,6 +1,5 @@ use std; import std::map; -import std::map::hashmap; fn main() { let m = map::new_bytes_hash();