1
Fork 0

hashmap: rm linear namespace

This commit is contained in:
Daniel Micay 2013-04-03 08:45:14 -04:00
parent 0cc903015b
commit 44029a5bbc
75 changed files with 1014 additions and 1018 deletions

View file

@ -441,7 +441,7 @@ expression context, the final namespace qualifier is omitted.
Two examples of paths with type arguments: Two examples of paths with type arguments:
~~~~ ~~~~
# use core::hashmap::linear::LinearMap; # use core::hashmap::LinearMap;
# fn f() { # fn f() {
# fn id<T:Copy>(t: T) -> T { t } # fn id<T:Copy>(t: T) -> T { t }
type t = LinearMap<int,~str>; // Type arguments used in a type expression type t = LinearMap<int,~str>; // Type arguments used in a type expression

View file

@ -1888,7 +1888,7 @@ illegal to copy and pass by value.
Generic `type`, `struct`, and `enum` declarations follow the same pattern: Generic `type`, `struct`, and `enum` declarations follow the same pattern:
~~~~ ~~~~
# use core::hashmap::linear::LinearMap; # use core::hashmap::LinearMap;
type Set<T> = LinearMap<T, ()>; type Set<T> = LinearMap<T, ()>;
struct Stack<T> { struct Stack<T> {

View file

@ -43,7 +43,7 @@ use io;
use libc::{size_t, uintptr_t}; use libc::{size_t, uintptr_t};
use option::{None, Option, Some}; use option::{None, Option, Some};
use ptr; use ptr;
use hashmap::linear::LinearSet; use hashmap::LinearSet;
use stackwalk; use stackwalk;
use sys; use sys;

View file

@ -13,8 +13,6 @@
//! The tables use a keyed hash with new random keys generated for each container, so the ordering //! The tables use a keyed hash with new random keys generated for each container, so the ordering
//! of a set of keys in a hash table is randomized. //! of a set of keys in a hash table is randomized.
/// Open addressing with linear probing.
pub mod linear {
use container::{Container, Mutable, Map, Set}; use container::{Container, Mutable, Map, Set};
use cmp::{Eq, Equiv}; use cmp::{Eq, Equiv};
use hash::Hash; use hash::Hash;
@ -683,8 +681,7 @@ pub mod linear {
mod test_map { mod test_map {
use container::{Container, Map, Set}; use container::{Container, Map, Set};
use option::{None, Some}; use option::{None, Some};
use hashmap::linear::LinearMap; use super::*;
use hashmap::linear;
use uint; use uint;
#[test] #[test]
@ -720,7 +717,7 @@ pub mod linear {
#[test] #[test]
pub fn test_insert_conflicts() { pub fn test_insert_conflicts() {
let mut m = linear::linear_map_with_capacity(4); let mut m = linear_map_with_capacity(4);
assert!(m.insert(1, 2)); assert!(m.insert(1, 2));
assert!(m.insert(5, 3)); assert!(m.insert(5, 3));
assert!(m.insert(9, 4)); assert!(m.insert(9, 4));
@ -731,7 +728,7 @@ pub mod linear {
#[test] #[test]
pub fn test_conflict_remove() { pub fn test_conflict_remove() {
let mut m = linear::linear_map_with_capacity(4); let mut m = linear_map_with_capacity(4);
assert!(m.insert(1, 2)); assert!(m.insert(1, 2));
assert!(m.insert(5, 3)); assert!(m.insert(5, 3));
assert!(m.insert(9, 4)); assert!(m.insert(9, 4));
@ -742,7 +739,7 @@ pub mod linear {
#[test] #[test]
pub fn test_is_empty() { pub fn test_is_empty() {
let mut m = linear::linear_map_with_capacity(4); let mut m = linear_map_with_capacity(4);
assert!(m.insert(1, 2)); assert!(m.insert(1, 2));
assert!(!m.is_empty()); assert!(!m.is_empty());
assert!(m.remove(&1)); assert!(m.remove(&1));
@ -796,7 +793,7 @@ pub mod linear {
#[test] #[test]
pub fn test_iterate() { pub fn test_iterate() {
let mut m = linear::linear_map_with_capacity(4); let mut m = linear_map_with_capacity(4);
for uint::range(0, 32) |i| { for uint::range(0, 32) |i| {
assert!(m.insert(i, i*2)); assert!(m.insert(i, i*2));
} }
@ -858,14 +855,14 @@ pub mod linear {
#[test] #[test]
mod test_set { mod test_set {
use hashmap::linear; use super::*;
use container::{Container, Map, Set}; use container::{Container, Map, Set};
use vec; use vec;
#[test] #[test]
fn test_disjoint() { fn test_disjoint() {
let mut xs = linear::LinearSet::new(); let mut xs = LinearSet::new();
let mut ys = linear::LinearSet::new(); let mut ys = LinearSet::new();
assert!(xs.is_disjoint(&ys)); assert!(xs.is_disjoint(&ys));
assert!(ys.is_disjoint(&xs)); assert!(ys.is_disjoint(&xs));
assert!(xs.insert(5)); assert!(xs.insert(5));
@ -886,13 +883,13 @@ pub mod linear {
#[test] #[test]
fn test_subset_and_superset() { fn test_subset_and_superset() {
let mut a = linear::LinearSet::new(); let mut a = LinearSet::new();
assert!(a.insert(0)); assert!(a.insert(0));
assert!(a.insert(5)); assert!(a.insert(5));
assert!(a.insert(11)); assert!(a.insert(11));
assert!(a.insert(7)); assert!(a.insert(7));
let mut b = linear::LinearSet::new(); let mut b = LinearSet::new();
assert!(b.insert(0)); assert!(b.insert(0));
assert!(b.insert(7)); assert!(b.insert(7));
assert!(b.insert(19)); assert!(b.insert(19));
@ -915,8 +912,8 @@ pub mod linear {
#[test] #[test]
fn test_intersection() { fn test_intersection() {
let mut a = linear::LinearSet::new(); let mut a = LinearSet::new();
let mut b = linear::LinearSet::new(); let mut b = LinearSet::new();
assert!(a.insert(11)); assert!(a.insert(11));
assert!(a.insert(1)); assert!(a.insert(1));
@ -945,8 +942,8 @@ pub mod linear {
#[test] #[test]
fn test_difference() { fn test_difference() {
let mut a = linear::LinearSet::new(); let mut a = LinearSet::new();
let mut b = linear::LinearSet::new(); let mut b = LinearSet::new();
assert!(a.insert(1)); assert!(a.insert(1));
assert!(a.insert(3)); assert!(a.insert(3));
@ -968,8 +965,8 @@ pub mod linear {
#[test] #[test]
fn test_symmetric_difference() { fn test_symmetric_difference() {
let mut a = linear::LinearSet::new(); let mut a = LinearSet::new();
let mut b = linear::LinearSet::new(); let mut b = LinearSet::new();
assert!(a.insert(1)); assert!(a.insert(1));
assert!(a.insert(3)); assert!(a.insert(3));
@ -994,8 +991,8 @@ pub mod linear {
#[test] #[test]
fn test_union() { fn test_union() {
let mut a = linear::LinearSet::new(); let mut a = LinearSet::new();
let mut b = linear::LinearSet::new(); let mut b = LinearSet::new();
assert!(a.insert(1)); assert!(a.insert(1));
assert!(a.insert(3)); assert!(a.insert(3));
@ -1022,4 +1019,3 @@ pub mod linear {
assert!(i == expected.len()); assert!(i == expected.len());
} }
} }
}

View file

@ -79,7 +79,7 @@ use comm::{Chan, GenericChan};
use prelude::*; use prelude::*;
use unstable; use unstable;
use ptr; use ptr;
use hashmap::linear::LinearSet; use hashmap::LinearSet;
use task::local_data_priv::{local_get, local_set}; use task::local_data_priv::{local_get, local_set};
use task::rt::rust_task; use task::rt::rust_task;
use task::rt; use task::rt;

View file

@ -34,7 +34,7 @@ use ops::Drop;
use unstable::{Exclusive, exclusive}; use unstable::{Exclusive, exclusive};
use unstable::at_exit::at_exit; use unstable::at_exit::at_exit;
use unstable::intrinsics::atomic_cxchg; use unstable::intrinsics::atomic_cxchg;
use hashmap::linear::LinearMap; use hashmap::LinearMap;
use sys::Closure; use sys::Closure;
#[cfg(test)] use unstable::{SharedMutableState, shared_mutable_state}; #[cfg(test)] use unstable::{SharedMutableState, shared_mutable_state};

View file

@ -21,7 +21,7 @@ is trying to shut down.
use cell::Cell; use cell::Cell;
use comm::{GenericSmartChan, stream}; use comm::{GenericSmartChan, stream};
use comm::{Port, Chan, SharedChan, GenericChan, GenericPort}; use comm::{Port, Chan, SharedChan, GenericChan, GenericPort};
use hashmap::linear::LinearMap; use hashmap::LinearMap;
use option::{Some, None}; use option::{Some, None};
use unstable::at_exit::at_exit; use unstable::at_exit::at_exit;
use unstable::finally::Finally; use unstable::finally::Finally;

View file

@ -18,7 +18,7 @@ use core::os;
use core::uint; use core::uint;
use core::util; use core::util;
use core::vec; use core::vec;
use core::hashmap::linear::LinearSet; use core::hashmap::LinearSet;
fn not_win32(os: session::os) -> bool { fn not_win32(os: session::os) -> bool {
match os { match os {

View file

@ -10,7 +10,7 @@
use core::prelude::*; use core::prelude::*;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::libc::c_uint; use core::libc::c_uint;
use core::option; use core::option;
use core::ptr; use core::ptr;

View file

@ -18,7 +18,7 @@ use metadata::decoder;
use metadata::filesearch::FileSearch; use metadata::filesearch::FileSearch;
use metadata::loader; use metadata::loader;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::vec; use core::vec;
use syntax::attr; use syntax::attr;
use syntax::codemap::{span, dummy_sp}; use syntax::codemap::{span, dummy_sp};

View file

@ -17,7 +17,7 @@ use core::prelude::*;
use metadata::cstore; use metadata::cstore;
use metadata::decoder; use metadata::decoder;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::vec; use core::vec;
use std; use std;
use syntax::ast; use syntax::ast;

View file

@ -25,7 +25,7 @@ use util::ppaux::ty_to_str;
use core::flate; use core::flate;
use core::hash::HashUtil; use core::hash::HashUtil;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::int; use core::int;
use core::io::{Writer, WriterUtil}; use core::io::{Writer, WriterUtil};
use core::io; use core::io;

View file

@ -16,7 +16,7 @@ use core::prelude::*;
use middle::ty::param_ty; use middle::ty::param_ty;
use middle::ty; use middle::ty;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::io::WriterUtil; use core::io::WriterUtil;
use core::io; use core::io;
use core::uint; use core::uint;

View file

@ -31,7 +31,7 @@ use middle::mem_categorization::{lp_comp, lp_deref, lp_local};
use middle::ty; use middle::ty;
use util::ppaux::ty_to_str; use util::ppaux::ty_to_str;
use core::hashmap::linear::LinearSet; use core::hashmap::LinearSet;
use core::uint; use core::uint;
use syntax::ast::m_mutbl; use syntax::ast::m_mutbl;
use syntax::ast; use syntax::ast;

View file

@ -31,7 +31,7 @@ use middle::ty;
use util::common::indenter; use util::common::indenter;
use util::ppaux::{expr_repr, region_to_str}; use util::ppaux::{expr_repr, region_to_str};
use core::hashmap::linear::{LinearSet, LinearMap}; use core::hashmap::{LinearSet, LinearMap};
use core::vec; use core::vec;
use syntax::ast::{m_const, m_imm, m_mutbl}; use syntax::ast::{m_const, m_imm, m_mutbl};
use syntax::ast; use syntax::ast;

View file

@ -234,7 +234,7 @@ use middle::moves;
use util::common::stmt_set; use util::common::stmt_set;
use util::ppaux::note_and_explain_region; use util::ppaux::note_and_explain_region;
use core::hashmap::linear::{LinearSet, LinearMap}; use core::hashmap::{LinearSet, LinearMap};
use core::io; use core::io;
use core::result::{Result, Ok, Err}; use core::result::{Result, Ok, Err};
use core::to_bytes; use core::to_bytes;

View file

@ -20,7 +20,7 @@ use core::vec;
use syntax::{ast, ast_map, ast_util, visit}; use syntax::{ast, ast_map, ast_util, visit};
use syntax::ast::*; use syntax::ast::*;
use core::hashmap::linear::{LinearMap, LinearSet}; use core::hashmap::{LinearMap, LinearSet};
// //
// This pass classifies expressions by their constant-ness. // This pass classifies expressions by their constant-ness.

View file

@ -17,7 +17,7 @@ use core::prelude::*;
use middle::resolve; use middle::resolve;
use middle::ty; use middle::ty;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use syntax::codemap::span; use syntax::codemap::span;
use syntax::{ast, ast_util, visit}; use syntax::{ast, ast_util, visit};

View file

@ -31,7 +31,7 @@ use syntax::ast_util::local_def;
use syntax::visit::{default_simple_visitor, mk_simple_visitor, SimpleVisitor}; use syntax::visit::{default_simple_visitor, mk_simple_visitor, SimpleVisitor};
use syntax::visit::visit_crate; use syntax::visit::visit_crate;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::ptr; use core::ptr;
pub enum LangItem { pub enum LangItem {

View file

@ -15,7 +15,7 @@ use driver::session;
use middle::ty; use middle::ty;
use util::ppaux::{ty_to_str}; use util::ppaux::{ty_to_str};
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::char; use core::char;
use core::cmp; use core::cmp;
use core::i8; use core::i8;

View file

@ -111,7 +111,7 @@ use middle::typeck;
use middle::moves; use middle::moves;
use util::ppaux::ty_to_str; use util::ppaux::ty_to_str;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::io::WriterUtil; use core::io::WriterUtil;
use core::io; use core::io;
use core::ptr; use core::ptr;

View file

@ -215,7 +215,7 @@ use middle::typeck::method_map;
use util::ppaux; use util::ppaux;
use util::common::indenter; use util::common::indenter;
use core::hashmap::linear::{LinearSet, LinearMap}; use core::hashmap::{LinearSet, LinearMap};
use core::vec; use core::vec;
use syntax::ast::*; use syntax::ast::*;
use syntax::ast_util; use syntax::ast_util;

View file

@ -12,7 +12,7 @@ use core::prelude::*;
use middle::resolve; use middle::resolve;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use syntax::ast::*; use syntax::ast::*;
use syntax::ast_util::{path_to_ident, walk_pat}; use syntax::ast_util::{path_to_ident, walk_pat};
use syntax::codemap::span; use syntax::codemap::span;

View file

@ -26,7 +26,7 @@ use middle::ty::{region_variance, rv_covariant, rv_invariant};
use middle::ty::{rv_contravariant}; use middle::ty::{rv_contravariant};
use middle::ty; use middle::ty;
use core::hashmap::linear::{LinearMap, LinearSet}; use core::hashmap::{LinearMap, LinearSet};
use core::vec; use core::vec;
use syntax::ast_map; use syntax::ast_map;
use syntax::codemap::span; use syntax::codemap::span;

View file

@ -77,7 +77,7 @@ use syntax::opt_vec::OptVec;
use core::option::Some; use core::option::Some;
use core::str::each_split_str; use core::str::each_split_str;
use core::hashmap::linear::{LinearMap, LinearSet}; use core::hashmap::{LinearMap, LinearSet};
// Definition mapping // Definition mapping
pub type DefMap = @mut LinearMap<node_id,def>; pub type DefMap = @mut LinearMap<node_id,def>;

View file

@ -167,7 +167,7 @@ use middle::trans::type_of;
use middle::ty; use middle::ty;
use util::common::indenter; use util::common::indenter;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use syntax::ast; use syntax::ast;
use syntax::ast::ident; use syntax::ast::ident;
use syntax::ast_util::path_to_ident; use syntax::ast_util::path_to_ident;

View file

@ -67,7 +67,7 @@ use util::ppaux::ty_to_str;
use util::ppaux; use util::ppaux;
use core::hash; use core::hash;
use core::hashmap::linear::{LinearMap, LinearSet}; use core::hashmap::{LinearMap, LinearSet};
use core::int; use core::int;
use core::io; use core::io;
use core::libc::{c_uint, c_ulonglong}; use core::libc::{c_uint, c_ulonglong};

View file

@ -18,7 +18,7 @@ use syntax::codemap::span;
use core::prelude::*; use core::prelude::*;
use core::cast; use core::cast;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::libc::{c_uint, c_ulonglong, c_char}; use core::libc::{c_uint, c_ulonglong, c_char};
use core::libc; use core::libc;
use core::option::Some; use core::option::Some;

View file

@ -45,7 +45,7 @@ use util::ppaux::{expr_repr, ty_to_str};
use core::cast; use core::cast;
use core::hash; use core::hash;
use core::hashmap::linear::{LinearMap, LinearSet}; use core::hashmap::{LinearMap, LinearSet};
use core::libc::{c_uint, c_longlong, c_ulonglong}; use core::libc::{c_uint, c_longlong, c_ulonglong};
use core::ptr; use core::ptr;
use core::str; use core::str;

View file

@ -20,7 +20,7 @@ use middle::trans;
use middle::ty; use middle::ty;
use util::ppaux::ty_to_str; use util::ppaux::ty_to_str;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::libc; use core::libc;
use core::option; use core::option;
use core::sys; use core::sys;

View file

@ -153,7 +153,7 @@ use util::common::indenter;
use util::ppaux::ty_to_str; use util::ppaux::ty_to_str;
use core::cast::transmute; use core::cast::transmute;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use syntax::print::pprust::{expr_to_str}; use syntax::print::pprust::{expr_to_str};
use syntax::ast; use syntax::ast;
use syntax::codemap; use syntax::codemap;

View file

@ -21,7 +21,7 @@ use middle::ty;
use middle::typeck; use middle::typeck;
use core::prelude::*; use core::prelude::*;
use core::hashmap::linear::LinearSet; use core::hashmap::LinearSet;
use syntax::ast; use syntax::ast;
use syntax::ast::*; use syntax::ast::*;
use syntax::ast_util::def_id_of_def; use syntax::ast_util::def_id_of_def;

View file

@ -36,7 +36,7 @@ use core::result;
use core::to_bytes; use core::to_bytes;
use core::uint; use core::uint;
use core::vec; use core::vec;
use core::hashmap::linear::{LinearMap, LinearSet}; use core::hashmap::{LinearMap, LinearSet};
use std::smallintmap::SmallIntMap; use std::smallintmap::SmallIntMap;
use syntax::ast::*; use syntax::ast::*;
use syntax::ast_util::{is_local, local_def}; use syntax::ast_util::{is_local, local_def};

View file

@ -18,7 +18,7 @@ use middle::typeck::check::{instantiate_path, lookup_def};
use middle::typeck::check::{structure_of, valid_range_bounds}; use middle::typeck::check::{structure_of, valid_range_bounds};
use middle::typeck::require_same_types; use middle::typeck::require_same_types;
use core::hashmap::linear::{LinearMap, LinearSet}; use core::hashmap::{LinearMap, LinearSet};
use core::vec; use core::vec;
use syntax::ast; use syntax::ast;
use syntax::ast_util; use syntax::ast_util;

View file

@ -95,7 +95,7 @@ use middle::typeck::{method_self, method_static, method_trait, method_super};
use util::common::indenter; use util::common::indenter;
use util::ppaux::expr_repr; use util::ppaux::expr_repr;
use core::hashmap::linear::LinearSet; use core::hashmap::LinearSet;
use core::result; use core::result;
use core::uint; use core::uint;
use core::vec; use core::vec;

View file

@ -110,7 +110,7 @@ use util::common::{block_query, indenter, loop_query};
use util::ppaux::{bound_region_to_str, expr_repr, pat_repr}; use util::ppaux::{bound_region_to_str, expr_repr, pat_repr};
use util::ppaux; use util::ppaux;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::ptr; use core::ptr;
use core::result::{Result, Ok, Err}; use core::result::{Result, Ok, Err};
use core::result; use core::result;

View file

@ -28,7 +28,7 @@ use core::result::{Ok, Err};
use core::result; use core::result;
use core::uint; use core::uint;
use core::vec; use core::vec;
use core::hashmap::linear::LinearSet; use core::hashmap::LinearSet;
use syntax::ast; use syntax::ast;
use syntax::ast_util; use syntax::ast_util;
use syntax::codemap::span; use syntax::codemap::span;

View file

@ -53,7 +53,7 @@ use syntax::visit::{visit_mod};
use util::ppaux::ty_to_str; use util::ppaux::ty_to_str;
use core::result::Ok; use core::result::Ok;
use core::hashmap::linear::{LinearMap, LinearSet}; use core::hashmap::{LinearMap, LinearSet};
use core::uint; use core::uint;
pub struct UniversalQuantificationResult { pub struct UniversalQuantificationResult {

View file

@ -548,7 +548,7 @@ use util::common::indenter;
use util::ppaux::note_and_explain_region; use util::ppaux::note_and_explain_region;
use core::cell::{Cell, empty_cell}; use core::cell::{Cell, empty_cell};
use core::hashmap::linear::{LinearMap, LinearSet}; use core::hashmap::{LinearMap, LinearSet};
use core::result::{Err, Ok}; use core::result::{Err, Ok};
use core::to_bytes; use core::to_bytes;
use core::uint; use core::uint;

View file

@ -55,7 +55,7 @@ use middle::ty;
use util::common::time; use util::common::time;
use util::ppaux; use util::ppaux;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::result; use core::result;
use core::vec; use core::vec;
use std::list::List; use std::list::List;

View file

@ -14,7 +14,7 @@ use syntax::ast;
use syntax::codemap::{span}; use syntax::codemap::{span};
use syntax::visit; use syntax::visit;
use core::hashmap::linear::LinearSet; use core::hashmap::LinearSet;
use core::str; use core::str;
use std; use std;

View file

@ -28,7 +28,7 @@ extern mod syntax(vers = "0.6");
use core::*; use core::*;
use core::container::Map; use core::container::Map;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::io::WriterUtil; use core::io::WriterUtil;
use rustc::driver::{driver, session}; use rustc::driver::{driver, session};
use rustc::metadata::filesearch; use rustc::metadata::filesearch;

View file

@ -10,7 +10,7 @@
use core::*; use core::*;
use core::hash::Streaming; use core::hash::Streaming;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use rustc::driver::{driver, session}; use rustc::driver::{driver, session};
use rustc::metadata::filesearch; use rustc::metadata::filesearch;
use std::getopts::groups::getopts; use std::getopts::groups::getopts;

View file

@ -16,7 +16,7 @@
use core::prelude::*; use core::prelude::*;
use core::io::{WriterUtil, ReaderUtil}; use core::io::{WriterUtil, ReaderUtil};
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use serialize::Encodable; use serialize::Encodable;
use serialize; use serialize;
@ -1161,7 +1161,7 @@ mod tests {
use super::*; use super::*;
use core::prelude::*; use core::prelude::*;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use std::serialize::Decodable; use std::serialize::Decodable;

View file

@ -17,7 +17,7 @@ use core::from_str::FromStr;
use core::io::{Reader, ReaderUtil}; use core::io::{Reader, ReaderUtil};
use core::io; use core::io;
use core::prelude::*; use core::prelude::*;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::str; use core::str;
use core::to_bytes::IterBytes; use core::to_bytes::IterBytes;
use core::to_bytes; use core::to_bytes;
@ -818,7 +818,7 @@ mod tests {
use net_url::*; use net_url::*;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
#[test] #[test]
pub fn test_url_parse() { pub fn test_url_parse() {

View file

@ -17,7 +17,7 @@ Core encoding and decoding interfaces.
#[forbid(non_camel_case_types)]; #[forbid(non_camel_case_types)];
use core::prelude::*; use core::prelude::*;
use core::hashmap::linear::{LinearMap, LinearSet}; use core::hashmap::{LinearMap, LinearSet};
use core::trie::{TrieMap, TrieSet}; use core::trie::{TrieMap, TrieSet};
use deque::Deque; use deque::Deque;
use dlist::DList; use dlist::DList;

View file

@ -24,7 +24,7 @@ use core::pipes::recv;
use core::prelude::*; use core::prelude::*;
use core::result; use core::result;
use core::run; use core::run;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::task; use core::task;
use core::to_bytes; use core::to_bytes;

View file

@ -23,7 +23,7 @@ use print::pprust;
use visit; use visit;
use core::cmp; use core::cmp;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::str; use core::str;
use core::vec; use core::vec;

View file

@ -20,7 +20,7 @@ use diagnostic::span_handler;
use parse::comments::{doc_comment_style, strip_doc_comment_decoration}; use parse::comments::{doc_comment_style, strip_doc_comment_decoration};
use core::vec; use core::vec;
use core::hashmap::linear::LinearSet; use core::hashmap::LinearSet;
use std; use std;
/* Constructors */ /* Constructors */

View file

@ -20,7 +20,7 @@ use parse;
use parse::token; use parse::token;
use core::vec; use core::vec;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
// new-style macro! tt code: // new-style macro! tt code:
// //
@ -509,7 +509,7 @@ impl <K: Eq + Hash + IterBytes ,V: Copy> MapChain<K,V>{
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use super::MapChain; use super::MapChain;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
#[test] fn testenv () { #[test] fn testenv () {
let mut a = LinearMap::new(); let mut a = LinearMap::new();

View file

@ -20,7 +20,7 @@ use parse::token::{Token, EOF, to_str, nonterminal};
use parse::token; use parse::token;
use core::prelude::*; use core::prelude::*;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
/* This is an Earley-like parser, without support for in-grammar nonterminals, /* This is an Earley-like parser, without support for in-grammar nonterminals,
only by calling out to the main rust parser for named nonterminals (which it only by calling out to the main rust parser for named nonterminals (which it

View file

@ -18,7 +18,7 @@ use ext::tt::macro_parser::{named_match, matched_seq, matched_nonterminal};
use parse::token::{EOF, INTERPOLATED, IDENT, Token, nt_ident, ident_interner}; use parse::token::{EOF, INTERPOLATED, IDENT, Token, nt_ident, ident_interner};
use parse::lexer::TokenAndSpan; use parse::lexer::TokenAndSpan;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::option; use core::option;
use core::vec; use core::vec;

View file

@ -94,7 +94,7 @@ use opt_vec::OptVec;
use core::either::Either; use core::either::Either;
use core::either; use core::either;
use core::hashmap::linear::LinearSet; use core::hashmap::LinearSet;
use core::vec; use core::vec;
#[deriving(Eq)] #[deriving(Eq)]

View file

@ -18,7 +18,7 @@ use util::interner;
use core::cast; use core::cast;
use core::char; use core::char;
use core::hashmap::linear::LinearSet; use core::hashmap::LinearSet;
use core::str; use core::str;
use core::task; use core::task;

View file

@ -13,7 +13,7 @@
// type, and vice versa. // type, and vice versa.
use core::prelude::*; use core::prelude::*;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
pub struct Interner<T> { pub struct Interner<T> {
priv map: @mut LinearMap<T, uint>, priv map: @mut LinearMap<T, uint>,

View file

@ -13,7 +13,7 @@
extern mod std; extern mod std;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
pub type header_map = LinearMap<~str, @mut ~[@~str]>; pub type header_map = LinearMap<~str, @mut ~[@~str]>;

View file

@ -13,7 +13,7 @@ extern mod std;
use core::io; use core::io;
use std::time; use std::time;
use std::treemap::TreeMap; use std::treemap::TreeMap;
use core::hashmap::linear::{LinearMap, LinearSet}; use core::hashmap::{LinearMap, LinearSet};
use core::trie::TrieMap; use core::trie::TrieMap;
fn timed(label: &str, f: &fn()) { fn timed(label: &str, f: &fn()) {

View file

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
extern mod std; extern mod std;
use core::hashmap::linear::LinearSet; use core::hashmap::LinearSet;
use std::bitv::BitvSet; use std::bitv::BitvSet;
use std::treemap::TreeSet; use std::treemap::TreeSet;
use core::io::WriterUtil; use core::io::WriterUtil;

View file

@ -24,7 +24,7 @@ use std::arc;
use std::time; use std::time;
use std::deque::Deque; use std::deque::Deque;
use std::par; use std::par;
use core::hashmap::linear::{LinearMap, LinearSet}; use core::hashmap::{LinearMap, LinearSet};
use core::io::WriterUtil; use core::io::WriterUtil;
use core::int::abs; use core::int::abs;
use core::rand::RngUtil; use core::rand::RngUtil;

View file

@ -15,7 +15,7 @@
extern mod std; extern mod std;
use std::sort; use std::sort;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::io::ReaderUtil; use core::io::ReaderUtil;
use core::comm::{stream, Port, Chan}; use core::comm::{stream, Port, Chan};
use core::cmp::Ord; use core::cmp::Ord;

View file

@ -25,7 +25,7 @@
// writes pbm image to output path // writes pbm image to output path
use core::io::WriterUtil; use core::io::WriterUtil;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
struct cmplx { struct cmplx {
re: f64, re: f64,

View file

@ -10,7 +10,7 @@
//buggy.rs //buggy.rs
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
fn main() { fn main() {
let mut buggy_map :LinearMap<uint, &uint> = let mut buggy_map :LinearMap<uint, &uint> =

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
use core::hashmap::linear::LinearSet; use core::hashmap::LinearSet;
struct Foo { struct Foo {
n: LinearSet<int>, n: LinearSet<int>,

View file

@ -11,7 +11,7 @@
// error-pattern: mismatched types // error-pattern: mismatched types
extern mod std; extern mod std;
use std::bitv; use std::bitv;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
struct FnInfo { struct FnInfo {
vars: LinearMap<uint, VarInfo> vars: LinearMap<uint, VarInfo>

View file

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
use core::container::Map; use core::container::Map;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
// Test that trait types printed in error msgs include the type arguments. // Test that trait types printed in error msgs include the type arguments.

View file

@ -14,7 +14,7 @@
fn main() { fn main() {
let count = @mut 0u; let count = @mut 0u;
let mut map = core::hashmap::linear::LinearMap::new(); let mut map = core::hashmap::LinearMap::new();
let mut arr = ~[]; let mut arr = ~[];
for uint::range(0u, 10u) |i| { for uint::range(0u, 10u) |i| {
arr += ~[@~"key stuff"]; arr += ~[@~"key stuff"];

View file

@ -19,7 +19,7 @@
pub fn map(filename: ~str, emit: map_reduce::putter) { emit(filename, ~"1"); } pub fn map(filename: ~str, emit: map_reduce::putter) { emit(filename, ~"1"); }
mod map_reduce { mod map_reduce {
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use core::comm::*; use core::comm::*;
pub type putter = @fn(~str, ~str); pub type putter = @fn(~str, ~str);

View file

@ -10,7 +10,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
pub fn main() { pub fn main() {
let mut m = LinearMap::new(); let mut m = LinearMap::new();

View file

@ -14,7 +14,7 @@
extern mod req; extern mod req;
use req::*; use req::*;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
pub fn main() { pub fn main() {
let v = ~[@~"hi"]; let v = ~[@~"hi"];

View file

@ -13,7 +13,7 @@
// Minimized version of issue-2804.rs. Both check that callee IDs don't // Minimized version of issue-2804.rs. Both check that callee IDs don't
// clobber the previous node ID in a macro expr // clobber the previous node ID in a macro expr
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
fn add_interfaces(managed_ip: ~str, device: LinearMap<~str, int>) { fn add_interfaces(managed_ip: ~str, device: LinearMap<~str, int>) {
error!("%s, %?", managed_ip, device.get(&~"interfaces")); error!("%s, %?", managed_ip, device.get(&~"interfaces"));

View file

@ -11,7 +11,7 @@
// except according to those terms. // except according to those terms.
extern mod std; extern mod std;
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
use std::json; use std::json;
enum object { enum object {

View file

@ -10,7 +10,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
pub fn main() { pub fn main() {
let mut buggy_map: LinearMap<uint, &uint> = LinearMap::new::<uint, &uint>(); let mut buggy_map: LinearMap<uint, &uint> = LinearMap::new::<uint, &uint>();

View file

@ -29,7 +29,7 @@ fn check_strs(actual: &str, expected: &str) -> bool
#[test] #[test]
fn tester() fn tester()
{ {
let mut table = core::hashmap::linear::LinearMap(); let mut table = core::hashmap::LinearMap();
table.insert(@~"one", 1); table.insert(@~"one", 1);
table.insert(@~"two", 2); table.insert(@~"two", 2);
assert!(check_strs(table.to_str(), ~"xxx")); // not sure what expected should be assert!(check_strs(table.to_str(), ~"xxx")); // not sure what expected should be

View file

@ -11,7 +11,7 @@
// xfail-test // xfail-test
extern mod std; extern mod std;
use hashmap::linear; use hashmap;
use std::json; use std::json;
use std::serialization::{Deserializable, deserialize}; use std::serialization::{Deserializable, deserialize};

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
use core::hashmap::linear::LinearMap; use core::hashmap::LinearMap;
pub fn main() { pub fn main() {
let mut x = LinearMap::new(); let mut x = LinearMap::new();