From 1662bd371c22ba5d476c0c9024fdd99534fc7867 Mon Sep 17 00:00:00 2001 From: Corey Richardson Date: Fri, 28 Jun 2013 18:32:26 -0400 Subject: [PATCH] Great renaming: propagate throughout the rest of the codebase --- src/libextra/arc.rs | 18 +++-- src/libextra/arena.rs | 21 +++--- src/libextra/base64.rs | 7 +- src/libextra/bitv.rs | 17 +++-- src/libextra/c_vec.rs | 9 ++- src/libextra/comm.rs | 9 ++- src/libextra/crypto/digest.rs | 5 +- src/libextra/crypto/sha1.rs | 3 +- src/libextra/crypto/sha2.rs | 3 +- src/libextra/dbg.rs | 6 +- src/libextra/deque.rs | 21 +++--- src/libextra/dlist.rs | 4 +- src/libextra/ebml.rs | 25 ++++--- src/libextra/extra.rs | 29 +++----- src/libextra/fileinput.rs | 20 +++--- src/libextra/flate.rs | 13 ++-- src/libextra/flatpipes.rs | 70 +++++++++---------- src/libextra/fun_treemap.rs | 5 +- src/libextra/future.rs | 17 +++-- src/libextra/getopts.rs | 21 +++--- src/libextra/io_util.rs | 8 +-- src/libextra/json.rs | 24 +++---- src/libextra/list.rs | 3 +- src/libextra/md4.rs | 5 +- src/libextra/net_ip.rs | 23 +++--- src/libextra/net_tcp.rs | 42 ++++++----- src/libextra/net_url.rs | 15 ++-- src/libextra/num/bigint.rs | 37 +++++----- src/libextra/num/complex.rs | 7 +- src/libextra/num/rational.rs | 12 ++-- src/libextra/par.rs | 11 ++- src/libextra/priority_queue.rs | 7 +- src/libextra/rc.rs | 13 ++-- src/libextra/rl.rs | 9 ++- src/libextra/rope.rs | 25 +++---- src/libextra/semver.rs | 15 ++-- src/libextra/serialize.rs | 11 ++- src/libextra/smallintmap.rs | 15 ++-- src/libextra/sort.rs | 33 ++++----- src/libextra/stats.rs | 9 ++- src/libextra/sync.rs | 24 +++---- src/libextra/task_pool.rs | 13 ++-- src/libextra/tempfile.rs | 28 ++++---- src/libextra/term.rs | 5 +- src/libextra/terminfo/parm.rs | 9 ++- src/libextra/terminfo/parser/compiled.rs | 7 +- src/libextra/terminfo/searcher.rs | 9 ++- src/libextra/terminfo/terminfo.rs | 2 +- src/libextra/test.rs | 39 +++++------ src/libextra/time.rs | 19 +++-- src/libextra/timer.rs | 28 ++++---- src/libextra/treemap.rs | 11 ++- src/libextra/uv_global_loop.rs | 21 +++--- src/libextra/uv_iotask.rs | 11 ++- src/libextra/uv_ll.rs | 28 ++++---- src/libextra/workcache.rs | 25 ++++--- src/librust/rust.rs | 21 ++---- src/librustc/back/link.rs | 47 ++++++------- src/librustc/back/passes.rs | 5 +- src/librustc/back/rpath.rs | 16 ++--- src/librustc/driver/driver.rs | 12 ++-- src/librustc/driver/session.rs | 3 +- src/librustc/front/config.rs | 5 +- src/librustc/front/std_inject.rs | 3 +- src/librustc/front/test.rs | 3 +- src/librustc/lib/llvm.rs | 11 ++- src/librustc/metadata/common.rs | 3 +- src/librustc/metadata/creader.rs | 5 +- src/librustc/metadata/csearch.rs | 3 +- src/librustc/metadata/cstore.rs | 5 +- src/librustc/metadata/decoder.rs | 15 ++-- src/librustc/metadata/encoder.rs | 17 +++-- src/librustc/metadata/filesearch.rs | 9 ++- src/librustc/metadata/loader.rs | 17 +++-- src/librustc/metadata/tydecode.rs | 5 +- src/librustc/metadata/tyencode.rs | 9 ++- src/librustc/middle/astencode.rs | 9 ++- src/librustc/middle/borrowck/check_loans.rs | 5 +- .../borrowck/gather_loans/gather_moves.rs | 1 - .../middle/borrowck/gather_loans/lifetime.rs | 1 - .../middle/borrowck/gather_loans/mod.rs | 1 - .../borrowck/gather_loans/restrictions.rs | 3 +- src/librustc/middle/borrowck/mod.rs | 9 ++- src/librustc/middle/borrowck/move_data.rs | 5 +- src/librustc/middle/check_const.rs | 1 - src/librustc/middle/check_match.rs | 5 +- src/librustc/middle/const_eval.rs | 7 +- src/librustc/middle/dataflow.rs | 11 ++- src/librustc/middle/entry.rs | 3 +- src/librustc/middle/freevars.rs | 3 +- src/librustc/middle/kind.rs | 1 - src/librustc/middle/lang_items.rs | 3 +- src/librustc/middle/lint.rs | 27 ++++--- src/librustc/middle/liveness.rs | 13 ++-- src/librustc/middle/mem_categorization.rs | 3 +- src/librustc/middle/moves.rs | 5 +- src/librustc/middle/pat_util.rs | 3 +- src/librustc/middle/privacy.rs | 3 +- src/librustc/middle/reachable.rs | 5 +- src/librustc/middle/region.rs | 3 +- src/librustc/middle/resolve.rs | 11 ++- src/librustc/middle/subst.rs | 1 - src/librustc/middle/trans/_match.rs | 7 +- src/librustc/middle/trans/adt.rs | 10 +-- src/librustc/middle/trans/asm.rs | 3 +- src/librustc/middle/trans/base.rs | 31 ++++---- src/librustc/middle/trans/build.rs | 11 ++- src/librustc/middle/trans/cabi.rs | 6 +- src/librustc/middle/trans/cabi_arm.rs | 4 +- src/librustc/middle/trans/cabi_mips.rs | 7 +- src/librustc/middle/trans/cabi_x86.rs | 1 - src/librustc/middle/trans/cabi_x86_64.rs | 8 +-- src/librustc/middle/trans/callee.rs | 3 - src/librustc/middle/trans/closure.rs | 5 +- src/librustc/middle/trans/common.rs | 17 +++-- src/librustc/middle/trans/consts.rs | 5 +- src/librustc/middle/trans/context.rs | 9 ++- src/librustc/middle/trans/controlflow.rs | 5 +- src/librustc/middle/trans/datum.rs | 3 +- src/librustc/middle/trans/debuginfo.rs | 17 +++-- src/librustc/middle/trans/expr.rs | 7 +- src/librustc/middle/trans/foreign.rs | 5 +- src/librustc/middle/trans/glue.rs | 7 +- src/librustc/middle/trans/inline.rs | 3 +- src/librustc/middle/trans/meth.rs | 3 +- src/librustc/middle/trans/monomorphize.rs | 3 +- src/librustc/middle/trans/reflect.rs | 6 +- src/librustc/middle/trans/tvec.rs | 2 +- src/librustc/middle/trans/type_.rs | 7 +- src/librustc/middle/trans/type_of.rs | 1 - src/librustc/middle/trans/type_use.rs | 6 +- src/librustc/middle/trans/write_guard.rs | 1 - src/librustc/middle/ty.rs | 21 +++--- src/librustc/middle/typeck/astconv.rs | 5 +- src/librustc/middle/typeck/check/_match.rs | 3 +- src/librustc/middle/typeck/check/demand.rs | 4 +- src/librustc/middle/typeck/check/method.rs | 9 ++- src/librustc/middle/typeck/check/mod.rs | 11 ++- src/librustc/middle/typeck/check/regionck.rs | 8 +-- .../middle/typeck/check/regionmanip.rs | 1 - src/librustc/middle/typeck/check/vtable.rs | 5 +- src/librustc/middle/typeck/check/writeback.rs | 1 - src/librustc/middle/typeck/coherence.rs | 9 ++- src/librustc/middle/typeck/collect.rs | 5 +- src/librustc/middle/typeck/infer/coercion.rs | 1 - src/librustc/middle/typeck/infer/combine.rs | 5 +- src/librustc/middle/typeck/infer/glb.rs | 1 - src/librustc/middle/typeck/infer/lattice.rs | 1 - src/librustc/middle/typeck/infer/lub.rs | 1 - src/librustc/middle/typeck/infer/mod.rs | 5 +- .../middle/typeck/infer/region_inference.rs | 9 ++- src/librustc/middle/typeck/infer/resolve.rs | 3 +- src/librustc/middle/typeck/infer/sub.rs | 1 - src/librustc/middle/typeck/infer/to_str.rs | 3 +- src/librustc/middle/typeck/infer/unify.rs | 1 - src/librustc/middle/typeck/mod.rs | 5 +- src/librustc/middle/typeck/rscope.rs | 3 +- src/librustc/rustc.rs | 42 +++++------ src/librustc/util/common.rs | 5 +- src/librustc/util/enum_set.rs | 6 +- src/librustc/util/ppaux.rs | 3 +- src/librustdoc/astsrv.rs | 7 +- src/librustdoc/attr_parser.rs | 2 - src/librustdoc/attr_pass.rs | 4 +- src/librustdoc/config.rs | 22 +++--- src/librustdoc/demo.rs | 1 - src/librustdoc/desc_to_brief_pass.rs | 4 +- src/librustdoc/doc.rs | 3 +- src/librustdoc/extract.rs | 3 +- src/librustdoc/fold.rs | 3 +- src/librustdoc/markdown_index_pass.rs | 2 - src/librustdoc/markdown_pass.rs | 8 +-- src/librustdoc/markdown_writer.rs | 20 +++--- src/librustdoc/page_pass.rs | 5 +- src/librustdoc/parse.rs | 1 - src/librustdoc/pass.rs | 1 - src/librustdoc/path_pass.rs | 1 - src/librustdoc/prune_private_pass.rs | 3 +- src/librustdoc/rustdoc.rs | 20 +----- src/librustdoc/sectionalize_pass.rs | 4 +- src/librustdoc/text_pass.rs | 4 +- src/librustdoc/trim_pass.rs | 2 +- src/librustdoc/tystr_pass.rs | 4 +- src/librustdoc/unindent_pass.rs | 3 +- src/librustdoc/util.rs | 1 - src/librustpkg/api.rs | 10 +-- src/librustpkg/conditions.rs | 2 +- src/librustpkg/context.rs | 3 +- src/librustpkg/crate.rs | 4 +- src/librustpkg/messages.rs | 4 +- src/librustpkg/package_id.rs | 1 - src/librustpkg/package_path.rs | 10 +-- src/librustpkg/package_source.rs | 6 +- src/librustpkg/path_util.rs | 9 ++- src/librustpkg/rustpkg.rs | 29 +++----- src/librustpkg/search.rs | 1 - src/librustpkg/tests.rs | 9 ++- .../fail/src/no-inferred-crates/src/zzyzx.rs | 2 +- .../testsuite/pass/src/hello-world/main.rs | 2 +- src/librustpkg/usage.rs | 2 +- src/librustpkg/util.rs | 5 +- src/librustpkg/version.rs | 3 +- src/librustpkg/workspace.rs | 2 +- 203 files changed, 808 insertions(+), 1086 deletions(-) diff --git a/src/libextra/arc.rs b/src/libextra/arc.rs index 30067c92300..924283fa8de 100644 --- a/src/libextra/arc.rs +++ b/src/libextra/arc.rs @@ -39,15 +39,14 @@ #[allow(missing_doc)]; -use core::prelude::*; use sync; use sync::{Mutex, mutex_with_condvars, RWlock, rwlock_with_condvars}; -use core::cast; -use core::unstable::sync::UnsafeAtomicRcBox; -use core::task; -use core::borrow; +use std::cast; +use std::unstable::sync::UnsafeAtomicRcBox; +use std::task; +use std::borrow; /// As sync::condvar, a mechanism for unlock-and-descheduling and signaling. pub struct Condvar<'self> { @@ -514,14 +513,13 @@ impl<'self, T:Freeze + Send> RWReadMode<'self, T> { #[cfg(test)] mod tests { - use core::prelude::*; use arc::*; - use core::cell::Cell; - use core::comm; - use core::task; - use core::uint; + use std::cell::Cell; + use std::comm; + use std::task; + use std::uint; #[test] fn manually_share_arc() { diff --git a/src/libextra/arena.rs b/src/libextra/arena.rs index 2c6e7a30448..f378384c564 100644 --- a/src/libextra/arena.rs +++ b/src/libextra/arena.rs @@ -34,22 +34,21 @@ #[allow(missing_doc)]; -use core::prelude::*; use list::{MutList, MutCons, MutNil}; -use core::at_vec; -use core::cast::{transmute, transmute_mut, transmute_mut_region}; -use core::cast; -use core::ptr; -use core::sys; -use core::uint; -use core::vec; -use core::unstable::intrinsics; -use core::unstable::intrinsics::{TyDesc}; +use std::at_vec; +use std::cast::{transmute, transmute_mut, transmute_mut_region}; +use std::cast; +use std::ptr; +use std::sys; +use std::uint; +use std::vec; +use std::unstable::intrinsics; +use std::unstable::intrinsics::{TyDesc}; #[cfg(not(stage0))] -use core::unstable::intrinsics::{get_tydesc}; +use std::unstable::intrinsics::{get_tydesc}; #[cfg(stage0)] unsafe fn get_tydesc() -> *TyDesc { diff --git a/src/libextra/base64.rs b/src/libextra/base64.rs index 392e7ff29a2..a53a22ee831 100644 --- a/src/libextra/base64.rs +++ b/src/libextra/base64.rs @@ -10,9 +10,8 @@ //! Base64 binary-to-text encoding -use core::prelude::*; -use core::vec; +use std::vec; /// A trait for converting a value to base64 encoding. pub trait ToBase64 { @@ -199,7 +198,7 @@ impl<'self> FromBase64 for &'self str { * Convert any base64 encoded string (literal, `@`, `&`, or `~`) * to the byte values it encodes. * - * You can use the `from_bytes` function in `core::str` + * You can use the `from_bytes` function in `std::str` * to turn a `[u8]` into a string with characters corresponding to those values. * * # Example @@ -210,7 +209,7 @@ impl<'self> FromBase64 for &'self str { * extern mod extra; * use extra::base64::ToBase64; * use extra::base64::FromBase64; - * use core::str; + * use std::str; * * fn main () { * let hello_str = "Hello, World".to_base64(); diff --git a/src/libextra/bitv.rs b/src/libextra/bitv.rs index 4fe7761bf18..ca1deaf33ee 100644 --- a/src/libextra/bitv.rs +++ b/src/libextra/bitv.rs @@ -10,12 +10,11 @@ #[allow(missing_doc)]; -use core::prelude::*; -use core::cmp; -use core::ops; -use core::uint; -use core::vec; +use std::cmp; +use std::ops; +use std::uint; +use std::vec; struct SmallBitv { /// only the lowest nbits of this value are used. the rest is undefined. @@ -868,10 +867,10 @@ mod tests { use bitv::*; use bitv; - use core::uint; - use core::vec; - use core::rand; - use core::rand::Rng; + use std::uint; + use std::vec; + use std::rand; + use std::rand::Rng; static bench_bits : uint = 1 << 14; diff --git a/src/libextra/c_vec.rs b/src/libextra/c_vec.rs index 79ef5bf2b7e..c6e7b5b0aa7 100644 --- a/src/libextra/c_vec.rs +++ b/src/libextra/c_vec.rs @@ -36,10 +36,9 @@ * still held if needed. */ -use core::prelude::*; -use core::option; -use core::ptr; +use std::option; +use std::ptr; /** * The type representing a foreign chunk of memory @@ -150,8 +149,8 @@ mod tests { use c_vec::*; - use core::libc::*; - use core::libc; + use std::libc::*; + use std::libc; fn malloc(n: size_t) -> CVec { unsafe { diff --git a/src/libextra/comm.rs b/src/libextra/comm.rs index 2cb2128db5f..44581efc6f0 100644 --- a/src/libextra/comm.rs +++ b/src/libextra/comm.rs @@ -16,12 +16,11 @@ Higher level communication abstractions. #[allow(missing_doc)]; -use core::prelude::*; -use core::comm::{GenericChan, GenericSmartChan, GenericPort}; -use core::comm::{Chan, Port, Selectable, Peekable}; -use core::comm; -use core::pipes; +use std::comm::{GenericChan, GenericSmartChan, GenericPort}; +use std::comm::{Chan, Port, Selectable, Peekable}; +use std::comm; +use std::pipes; /// An extension of `pipes::stream` that allows both sending and receiving. pub struct DuplexStream { diff --git a/src/libextra/crypto/digest.rs b/src/libextra/crypto/digest.rs index c4fb03a7a7d..26e8b80d8e3 100644 --- a/src/libextra/crypto/digest.rs +++ b/src/libextra/crypto/digest.rs @@ -8,10 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; -use core::uint; -use core::vec; +use std::uint; +use std::vec; /** * The Digest trait specifies an interface common to digest functions, such as SHA-1 and the SHA-2 diff --git a/src/libextra/crypto/sha1.rs b/src/libextra/crypto/sha1.rs index 5a67e08c190..238e4a4d238 100644 --- a/src/libextra/crypto/sha1.rs +++ b/src/libextra/crypto/sha1.rs @@ -22,7 +22,6 @@ * the `reset` method. */ -use core::prelude::*; use digest::Digest; @@ -241,7 +240,7 @@ impl Digest for Sha1 { #[cfg(test)] mod tests { - use core::vec; + use std::vec; use digest::{Digest, DigestUtil}; use sha1::Sha1; diff --git a/src/libextra/crypto/sha2.rs b/src/libextra/crypto/sha2.rs index e9c6ac72212..4b120c7b118 100644 --- a/src/libextra/crypto/sha2.rs +++ b/src/libextra/crypto/sha2.rs @@ -8,9 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; -use core::uint; +use std::uint; use digest::Digest; diff --git a/src/libextra/dbg.rs b/src/libextra/dbg.rs index 43c4aecdd27..1f424b23430 100644 --- a/src/libextra/dbg.rs +++ b/src/libextra/dbg.rs @@ -12,17 +12,17 @@ #[allow(missing_doc)]; -use core::cast::transmute; +use std::cast::transmute; #[cfg(stage0)] use intrinsic::{get_tydesc}; #[cfg(not(stage0))] -use core::unstable::intrinsics::{get_tydesc}; +use std::unstable::intrinsics::{get_tydesc}; pub mod rustrt { #[cfg(stage0)] use intrinsic::{TyDesc}; #[cfg(not(stage0))] - use core::unstable::intrinsics::{TyDesc}; + use std::unstable::intrinsics::{TyDesc}; #[abi = "cdecl"] pub extern { diff --git a/src/libextra/deque.rs b/src/libextra/deque.rs index c70c87b6ea1..2b599d06daf 100644 --- a/src/libextra/deque.rs +++ b/src/libextra/deque.rs @@ -9,12 +9,11 @@ // except according to those terms. //! A double-ended queue implemented as a circular buffer -use core::prelude::*; -use core::uint; -use core::util::replace; -use core::vec; -use core::cast::transmute; +use std::uint; +use std::util::replace; +use std::vec; +use std::cast::transmute; static initial_capacity: uint = 32u; // 2^5 @@ -254,8 +253,8 @@ fn get<'r, T>(elts: &'r [Option], i: uint) -> &'r T { #[cfg(test)] mod tests { use super::*; - use core::cmp::Eq; - use core::kinds::Copy; + use std::cmp::Eq; + use std::kinds::Copy; use core; #[test] @@ -463,12 +462,12 @@ mod tests { #[test] fn test_iter() { let mut d = Deque::new(); - for core::int::range(0,5) |i| { + for std::int::range(0,5) |i| { d.add_back(i); } assert_eq!(d.iter().collect::<~[&int]>(), ~[&0,&1,&2,&3,&4]); - for core::int::range(6,9) |i| { + for std::int::range(6,9) |i| { d.add_front(i); } assert_eq!(d.iter().collect::<~[&int]>(), ~[&8,&7,&6,&0,&1,&2,&3,&4]); @@ -477,12 +476,12 @@ mod tests { #[test] fn test_rev_iter() { let mut d = Deque::new(); - for core::int::range(0,5) |i| { + for std::int::range(0,5) |i| { d.add_back(i); } assert_eq!(d.rev_iter().collect::<~[&int]>(), ~[&4,&3,&2,&1,&0]); - for core::int::range(6,9) |i| { + for std::int::range(6,9) |i| { d.add_front(i); } assert_eq!(d.rev_iter().collect::<~[&int]>(), ~[&4,&3,&2,&1,&0,&6,&7,&8]); diff --git a/src/libextra/dlist.rs b/src/libextra/dlist.rs index ee86340e47b..e7dcb0fd7ce 100644 --- a/src/libextra/dlist.rs +++ b/src/libextra/dlist.rs @@ -18,9 +18,8 @@ Do not use ==, !=, <, etc on doubly-linked lists -- it may not terminate. */ -use core::prelude::*; -use core::managed; +use std::managed; pub type DListLink = Option<@mut DListNode>; @@ -522,7 +521,6 @@ impl DList { #[cfg(test)] mod tests { - use core::prelude::*; use super::*; diff --git a/src/libextra/ebml.rs b/src/libextra/ebml.rs index 4634a7db05e..c79b012cfc5 100644 --- a/src/libextra/ebml.rs +++ b/src/libextra/ebml.rs @@ -10,9 +10,8 @@ #[allow(missing_doc)]; -use core::prelude::*; -use core::str; +use std::str; // Simple Extensible Binary Markup Language (ebml) reader and writer on a // cursor model. See the specification here: @@ -94,18 +93,18 @@ pub mod reader { use serialize; - use core::cast::transmute; - use core::int; - use core::io; - use core::option::{None, Option, Some}; + use std::cast::transmute; + use std::int; + use std::io; + use std::option::{None, Option, Some}; #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")] - use core::ptr::offset; + use std::ptr::offset; #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")] - use core::unstable::intrinsics::bswap32; + use std::unstable::intrinsics::bswap32; // ebml reading @@ -378,7 +377,7 @@ pub mod reader { fn read_u8 (&mut self) -> u8 { doc_as_u8 (self.next_doc(EsU8 )) } fn read_uint(&mut self) -> uint { let v = doc_as_u64(self.next_doc(EsUint)); - if v > (::core::uint::max_value as u64) { + if v > (::std::uint::max_value as u64) { fail!("uint %? too large for this architecture", v); } v as uint @@ -611,8 +610,8 @@ pub mod reader { pub mod writer { use super::*; - use core::cast; - use core::io; + use std::cast; + use std::io; // ebml writing pub struct Encoder { @@ -957,8 +956,8 @@ mod tests { use serialize::Encodable; use serialize; - use core::io; - use core::option::{None, Option, Some}; + use std::io; + use std::option::{None, Option, Some}; #[test] fn test_option_int() { diff --git a/src/libextra/extra.rs b/src/libextra/extra.rs index 11aebdf467f..dae1487092b 100644 --- a/src/libextra/extra.rs +++ b/src/libextra/extra.rs @@ -32,13 +32,9 @@ Rust extras are part of the standard Rust distribution. #[deny(non_camel_case_types)]; #[deny(missing_doc)]; -#[no_std]; +use std::str::{StrSlice, OwnedStr}; -extern mod core(name = "std", vers = "0.7-pre"); - -use core::str::{StrSlice, OwnedStr}; - -pub use core::os; +pub use std::os; pub mod uv_ll; @@ -135,21 +131,16 @@ pub mod serialize; // 'extra' so that macro-expanded references to extra::serialize and such // can be resolved within libextra. #[doc(hidden)] -pub mod std { +pub mod extra { pub use serialize; pub use test; // For bootstrapping. - pub use core::clone; - pub use core::condition; - pub use core::cmp; - pub use core::sys; - pub use core::unstable; - pub use core::str; - pub use core::os; -} -#[doc(hidden)] -pub mod extra { - pub use serialize; - pub use test; + pub use std::clone; + pub use std::condition; + pub use std::cmp; + pub use std::sys; + pub use std::unstable; + pub use std::str; + pub use std::os; } diff --git a/src/libextra/fileinput.rs b/src/libextra/fileinput.rs index 7a1e925a15d..5367da2fa8d 100644 --- a/src/libextra/fileinput.rs +++ b/src/libextra/fileinput.rs @@ -57,14 +57,14 @@ For more complicated uses (e.g. if one needs to pause iteration and resume it later), a `FileInput` instance can be constructed via the `from_vec`, `from_vec_raw` and `from_args` functions. -Once created, the `each_line` (from the `core::io::ReaderUtil` trait) +Once created, the `each_line` (from the `std::io::ReaderUtil` trait) and `each_line_state` methods allow one to iterate on the lines; the latter provides more information about the position within the iteration to the caller. It is possible (and safe) to skip lines and files using the `read_line` and `next_file` methods. Also, `FileInput` implements -`core::io::Reader`, and the state will be updated correctly while +`std::io::Reader`, and the state will be updated correctly while using any of those methods. E.g. the following program reads until an empty line, pauses for user @@ -96,12 +96,11 @@ total line count). #[allow(missing_doc)]; -use core::prelude::*; -use core::io::ReaderUtil; -use core::io; -use core::os; -use core::vec; +use std::io::ReaderUtil; +use std::io; +use std::os; +use std::vec; /** A summary of the internal state of a `FileInput` object. `line_num` @@ -410,13 +409,12 @@ pub fn input_vec_state(files: ~[Option], #[cfg(test)] mod test { - use core::prelude::*; use super::{FileInput, pathify, input_vec, input_vec_state}; - use core::io; - use core::uint; - use core::vec; + use std::io; + use std::uint; + use std::vec; fn make_file(path : &Path, contents: &[~str]) { let file = io::file_writer(path, [io::Create, io::Truncate]).get(); diff --git a/src/libextra/flate.rs b/src/libextra/flate.rs index 0fde03b69cb..b83177fff0b 100644 --- a/src/libextra/flate.rs +++ b/src/libextra/flate.rs @@ -16,12 +16,12 @@ Simple compression #[allow(missing_doc)]; -use core::libc::{c_void, size_t, c_int}; -use core::libc; -use core::vec; +use std::libc::{c_void, size_t, c_int}; +use std::libc; +use std::vec; pub mod rustrt { - use core::libc::{c_int, c_void, size_t}; + use std::libc::{c_int, c_void, size_t}; #[link_name = "rustrt"] pub extern { @@ -83,9 +83,8 @@ pub fn inflate_bytes(bytes: &const [u8]) -> ~[u8] { #[cfg(test)] mod tests { use super::*; - use core::rand; - use core::rand::RngUtil; - use core::prelude::*; + use std::rand; + use std::rand::RngUtil; #[test] #[allow(non_implicitly_copyable_typarams)] diff --git a/src/libextra/flatpipes.rs b/src/libextra/flatpipes.rs index d5e43e85a14..e8bdc951ca4 100644 --- a/src/libextra/flatpipes.rs +++ b/src/libextra/flatpipes.rs @@ -49,14 +49,13 @@ block the scheduler thread, so will their pipes. #[allow(missing_doc)]; -use core::prelude::*; // The basic send/recv interface FlatChan and PortChan will implement -use core::io; -use core::comm::GenericChan; -use core::comm::GenericPort; -use core::sys::size_of; -use core::vec; +use std::io; +use std::comm::GenericChan; +use std::comm::GenericPort; +use std::sys::size_of; +use std::vec; /** A FlatPort, consisting of a `BytePort` that receives byte vectors, @@ -95,9 +94,9 @@ pub mod serial { use flatpipes::bytepipes::{PipeBytePort, PipeByteChan}; use flatpipes::{FlatPort, FlatChan}; - use core::io::{Reader, Writer}; - use core::comm::{Port, Chan}; - use core::comm; + use std::io::{Reader, Writer}; + use std::comm::{Port, Chan}; + use std::comm; pub type ReaderPort = FlatPort< T, DeserializingUnflattener, @@ -172,16 +171,15 @@ POD are not equivelant. */ pub mod pod { - use core::prelude::*; use flatpipes::flatteners::{PodUnflattener, PodFlattener}; use flatpipes::bytepipes::{ReaderBytePort, WriterByteChan}; use flatpipes::bytepipes::{PipeBytePort, PipeByteChan}; use flatpipes::{FlatPort, FlatChan}; - use core::io::{Reader, Writer}; - use core::comm::{Port, Chan}; - use core::comm; + use std::io::{Reader, Writer}; + use std::comm::{Port, Chan}; + use std::comm; pub type ReaderPort = FlatPort, ReaderBytePort>; @@ -337,7 +335,6 @@ impl,C:ByteChan> FlatChan { pub mod flatteners { - use core::prelude::*; use ebml; use flatpipes::{Flattener, Unflattener}; @@ -345,12 +342,12 @@ pub mod flatteners { use json; use serialize::{Encoder, Decoder, Encodable, Decodable}; - use core::cast; - use core::io::{Writer, Reader, ReaderUtil}; - use core::io; - use core::ptr; - use core::sys::size_of; - use core::vec; + use std::cast; + use std::io::{Writer, Reader, ReaderUtil}; + use std::io; + use std::ptr; + use std::sys::size_of; + use std::vec; // FIXME #4074: Copy + Send != POD pub struct PodUnflattener { @@ -509,13 +506,12 @@ pub mod flatteners { } pub mod bytepipes { - use core::prelude::*; use flatpipes::{ByteChan, BytePort}; - use core::comm::{Port, Chan}; - use core::comm; - use core::io::{Writer, Reader, ReaderUtil}; + use std::comm::{Port, Chan}; + use std::comm; + use std::io::{Writer, Reader, ReaderUtil}; pub struct ReaderBytePort { reader: R @@ -583,12 +579,12 @@ pub mod bytepipes { impl BytePort for PipeBytePort { fn try_recv(&self, count: uint) -> Option<~[u8]> { if self.buf.len() >= count { - let mut bytes = ::core::util::replace(&mut *self.buf, ~[]); + let mut bytes = ::std::util::replace(&mut *self.buf, ~[]); *self.buf = bytes.slice(count, bytes.len()).to_owned(); bytes.truncate(count); return Some(bytes); } else if !self.buf.is_empty() { - let mut bytes = ::core::util::replace(&mut *self.buf, ~[]); + let mut bytes = ::std::util::replace(&mut *self.buf, ~[]); assert!(count > bytes.len()); match self.try_recv(count - bytes.len()) { Some(rest) => { @@ -637,7 +633,6 @@ pub mod bytepipes { #[cfg(test)] mod test { - use core::prelude::*; use flatpipes::{Flattener, Unflattener}; use flatpipes::bytepipes::*; @@ -647,11 +642,11 @@ mod test { use flatpipes::{BytePort, FlatChan, FlatPort}; use net::tcp::TcpSocketBuf; - use core::comm; - use core::int; - use core::io::BytesWriter; - use core::result; - use core::task; + use std::comm; + use std::int; + use std::io::BytesWriter; + use std::result; + use std::task; #[test] #[ignore(reason = "ebml failure")] @@ -772,7 +767,7 @@ mod test { writer_chan: WriterChanFactory, port: uint) { - use core::cell::Cell; + use std::cell::Cell; use net::ip; use net::tcp; use uv; @@ -871,17 +866,16 @@ mod test { // Tests that the different backends behave the same when the // binary streaming protocol is broken mod broken_protocol { - use core::prelude::*; use flatpipes::{BytePort, FlatPort}; use flatpipes::flatteners::PodUnflattener; use flatpipes::pod; use io_util::BufReader; - use core::comm; - use core::io; - use core::sys; - use core::task; + use std::comm; + use std::io; + use std::sys; + use std::task; type PortLoader

= ~fn(~[u8]) -> FlatPort, P>; diff --git a/src/libextra/fun_treemap.rs b/src/libextra/fun_treemap.rs index 5906e809c98..4461a4dba5f 100644 --- a/src/libextra/fun_treemap.rs +++ b/src/libextra/fun_treemap.rs @@ -19,10 +19,9 @@ * of features. */ -use core::prelude::*; -use core::cmp::{Eq, Ord}; -use core::option::{Some, None}; +use std::cmp::{Eq, Ord}; +use std::option::{Some, None}; pub type Treemap = @TreeNode; diff --git a/src/libextra/future.rs b/src/libextra/future.rs index 00f4cc3989b..3ef71e1731b 100644 --- a/src/libextra/future.rs +++ b/src/libextra/future.rs @@ -25,13 +25,12 @@ #[allow(missing_doc)]; -use core::prelude::*; -use core::cast; -use core::cell::Cell; -use core::comm::{PortOne, oneshot, send_one, recv_one}; -use core::task; -use core::util::replace; +use std::cast; +use std::cell::Cell; +use std::comm::{PortOne, oneshot, send_one, recv_one}; +use std::task; +use std::util::replace; #[doc = "The future type"] pub struct Future { @@ -151,9 +150,9 @@ pub fn spawn(blk: ~fn() -> A) -> Future { mod test { use future::*; - use core::cell::Cell; - use core::comm::{oneshot, send_one}; - use core::task; + use std::cell::Cell; + use std::comm::{oneshot, send_one}; + use std::task; #[test] fn test_from_value() { diff --git a/src/libextra/getopts.rs b/src/libextra/getopts.rs index fa064e6330e..21fe676ef79 100644 --- a/src/libextra/getopts.rs +++ b/src/libextra/getopts.rs @@ -81,14 +81,13 @@ #[allow(missing_doc)]; -use core::prelude::*; -use core::cmp::Eq; -use core::result::{Err, Ok}; -use core::result; -use core::option::{Some, None}; -use core::str; -use core::vec; +use std::cmp::Eq; +use std::result::{Err, Ok}; +use std::result; +use std::option::{Some, None}; +use std::str; +use std::vec; #[deriving(Eq)] pub enum Name { @@ -466,8 +465,8 @@ pub mod groups { use getopts::{HasArg, Long, Maybe, Multi, No, Occur, Opt, Optional, Req}; use getopts::{Short, Yes}; - use core::str; - use core::vec; + use std::str; + use std::vec; /** one group of options, e.g., both -h and --help, along with * their shared description and properties @@ -681,8 +680,8 @@ mod tests { use getopts::groups::OptGroup; use getopts::*; - use core::result::{Err, Ok}; - use core::result; + use std::result::{Err, Ok}; + use std::result; fn check_fail_type(f: Fail_, ft: FailType) { match f { diff --git a/src/libextra/io_util.rs b/src/libextra/io_util.rs index 11dea1c3a70..afefca8ae65 100644 --- a/src/libextra/io_util.rs +++ b/src/libextra/io_util.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::io::{Reader, BytesReader}; -use core::io; -use core::cast; +use std::io::{Reader, BytesReader}; +use std::io; +use std::cast; /// An implementation of the io::Reader interface which reads a buffer of bytes pub struct BufReader { @@ -31,7 +31,7 @@ impl BufReader { fn as_bytes_reader(&self, f: &fn(&BytesReader) -> A) -> A { // XXX FIXME(#5723) - let bytes = ::core::util::id::<&[u8]>(self.buf); + let bytes = ::std::util::id::<&[u8]>(self.buf); let bytes: &'static [u8] = unsafe { cast::transmute(bytes) }; // Recreating the BytesReader state every call since // I can't get the borrowing to work correctly diff --git a/src/libextra/json.rs b/src/libextra/json.rs index a71be18174a..75881544246 100644 --- a/src/libextra/json.rs +++ b/src/libextra/json.rs @@ -16,16 +16,15 @@ //! json serialization -use core::prelude::*; -use core::char; -use core::float; -use core::hashmap::HashMap; -use core::io::{WriterUtil, ReaderUtil}; -use core::io; -use core::str; -use core::to_str; -use core::vec; +use std::char; +use std::float; +use std::hashmap::HashMap; +use std::io::{WriterUtil, ReaderUtil}; +use std::io; +use std::str; +use std::to_str; +use std::vec; use serialize::Encodable; use serialize; @@ -1356,13 +1355,12 @@ impl to_str::ToStr for Error { #[cfg(test)] mod tests { - use core::prelude::*; use super::*; - use core::hashmap::HashMap; - use core::io; - use core::result; + use std::hashmap::HashMap; + use std::io; + use std::result; use std::serialize::Decodable; diff --git a/src/libextra/list.rs b/src/libextra/list.rs index 34c35e0d7fd..86b01cf157d 100644 --- a/src/libextra/list.rs +++ b/src/libextra/list.rs @@ -10,7 +10,6 @@ //! A standard, garbage-collected linked list. -use core::prelude::*; #[deriving(Eq)] @@ -181,7 +180,7 @@ mod tests { use list::*; use list; - use core::option; + use std::option; #[test] fn test_is_empty() { diff --git a/src/libextra/md4.rs b/src/libextra/md4.rs index 3be7394b46d..6b08fea580f 100644 --- a/src/libextra/md4.rs +++ b/src/libextra/md4.rs @@ -8,10 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; -use core::uint; -use core::vec; +use std::uint; +use std::vec; struct Quad { a: u32, diff --git a/src/libextra/net_ip.rs b/src/libextra/net_ip.rs index fc3c765999b..d18aac68481 100644 --- a/src/libextra/net_ip.rs +++ b/src/libextra/net_ip.rs @@ -12,13 +12,12 @@ #[allow(missing_doc)]; -use core::prelude::*; -use core::libc; -use core::comm::{stream, SharedChan}; -use core::ptr; -use core::result; -use core::str; +use std::libc; +use std::comm::{stream, SharedChan}; +use std::ptr; +use std::result; +use std::str; use iotask = uv::iotask::IoTask; use interact = uv::iotask::interact; @@ -149,16 +148,15 @@ pub fn get_addr(node: &str, iotask: &iotask) } pub mod v4 { - use core::prelude::*; use net::ip::{IpAddr, Ipv4, ParseAddrErr}; use uv::ll; use uv_ip4_addr = uv::ll::ip4_addr; use uv_ip4_name = uv::ll::ip4_name; - use core::cast::transmute; - use core::result; - use core::uint; + use std::cast::transmute; + use std::result; + use std::uint; /** * Convert a str to `ip_addr` @@ -248,13 +246,12 @@ pub mod v4 { } } pub mod v6 { - use core::prelude::*; use net::ip::{IpAddr, Ipv6, ParseAddrErr}; use uv_ip6_addr = uv::ll::ip6_addr; use uv_ip6_name = uv::ll::ip6_name; - use core::result; + use std::result; /** * Convert a str to `ip_addr` @@ -371,7 +368,7 @@ mod test { use net_ip::v6; use uv; - use core::result; + use std::result; #[test] fn test_ip_ipv4_parse_and_format_ip() { diff --git a/src/libextra/net_tcp.rs b/src/libextra/net_tcp.rs index f3f6ffde660..6a22950ec04 100644 --- a/src/libextra/net_tcp.rs +++ b/src/libextra/net_tcp.rs @@ -13,7 +13,6 @@ #[allow(missing_doc)]; -use core::prelude::*; use future; use future_spawn = future::spawn; @@ -22,18 +21,18 @@ use uv; use uv::iotask; use uv::iotask::IoTask; -use core::io; -use core::libc::size_t; -use core::libc; -use core::comm::{stream, Port, SharedChan}; -use core::ptr; -use core::result::{Result}; -use core::result; -use core::uint; -use core::vec; +use std::io; +use std::libc::size_t; +use std::libc; +use std::comm::{stream, Port, SharedChan}; +use std::ptr; +use std::result::{Result}; +use std::result; +use std::uint; +use std::vec; pub mod rustrt { - use core::libc; + use std::libc; #[nolink] pub extern { @@ -360,7 +359,7 @@ pub fn write_future(sock: &TcpSocket, raw_write_data: ~[u8]) * # Returns * * * A `Result` instance that will either contain a - * `core::comm::Port>` that the user can read + * `std::comm::Port>` that the user can read * (and * optionally, loop on) from until `read_stop` is called, or a * `TcpErrData` record */ @@ -619,7 +618,7 @@ pub fn accept(new_conn: TcpNewConnection) * callback's arguments are: * * `new_conn` - an opaque type that can be passed to * `net::tcp::accept` in order to be converted to a `TcpSocket`. - * * `kill_ch` - channel of type `core::comm::Chan>`. + * * `kill_ch` - channel of type `std::comm::Chan>`. * this channel can be used to send a message to cause `listen` to begin * closing the underlying libuv data structures. * @@ -683,7 +682,7 @@ fn listen_common(host_ip: ip::IpAddr, // will defeat a move sigil, as is done to the host_ip // arg above.. this same pattern works w/o complaint in // tcp::connect (because the iotask::interact cb isn't - // nested within a core::comm::listen block) + // nested within a std::comm::listen block) let loc_ip = copy(host_ip); do iotask::interact(iotask) |loop_ptr| { unsafe { @@ -1429,7 +1428,6 @@ struct TcpBufferedSocketData { #[cfg(test)] mod test { - use core::prelude::*; use net::ip; use net::tcp::{GenericListenErr, TcpConnectErrData, TcpListenErrData}; @@ -1438,12 +1436,12 @@ mod test { use uv::iotask::IoTask; use uv; - use core::cell::Cell; - use core::comm::{stream, SharedChan}; - use core::io; - use core::result; - use core::str; - use core::task; + use std::cell::Cell; + use std::comm::{stream, SharedChan}; + use std::io; + use std::result; + use std::str; + use std::task; // FIXME don't run on fbsd or linux 32 bit (#2064) #[cfg(target_os="win32")] @@ -1745,7 +1743,7 @@ mod test { } pub fn impl_tcp_socket_impl_reader_handles_eof() { - use core::io::{Reader,ReaderUtil}; + use std::io::{Reader,ReaderUtil}; let hl_loop = &uv::global_loop::get(); let server_ip = "127.0.0.1"; diff --git a/src/libextra/net_url.rs b/src/libextra/net_url.rs index a60f51e751e..9ac58efe793 100644 --- a/src/libextra/net_url.rs +++ b/src/libextra/net_url.rs @@ -12,14 +12,13 @@ #[allow(missing_doc)]; -use core::prelude::*; -use core::cmp::Eq; -use core::io::{Reader, ReaderUtil}; -use core::io; -use core::hashmap::HashMap; -use core::to_bytes; -use core::uint; +use std::cmp::Eq; +use std::io::{Reader, ReaderUtil}; +use std::io; +use std::hashmap::HashMap; +use std::to_bytes; +use std::uint; #[deriving(Clone, Eq)] struct Url { @@ -803,7 +802,7 @@ mod tests { use net_url::*; - use core::hashmap::HashMap; + use std::hashmap::HashMap; #[test] fn test_url_parse() { diff --git a/src/libextra/num/bigint.rs b/src/libextra/num/bigint.rs index 002d8a7f956..fd61c4f6bfc 100644 --- a/src/libextra/num/bigint.rs +++ b/src/libextra/num/bigint.rs @@ -18,13 +18,12 @@ A BigInt is a combination of BigUint and Sign. #[allow(missing_doc)]; -use core::prelude::*; -use core::cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater}; -use core::int; -use core::num::{IntConvertible, Zero, One, ToStrRadix, FromStrRadix, Orderable}; -use core::str; -use core::uint; -use core::vec; +use std::cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater}; +use std::int; +use std::num::{IntConvertible, Zero, One, ToStrRadix, FromStrRadix, Orderable}; +use std::str; +use std::uint; +use std::vec; /** A BigDigit is a BigUint's composing element. @@ -1148,16 +1147,15 @@ impl BigInt { #[cfg(test)] mod biguint_tests { - use core::prelude::*; use super::*; - use core::cmp::{Less, Equal, Greater}; - use core::int; - use core::num::{IntConvertible, Zero, One, FromStrRadix}; - use core::str; - use core::uint; - use core::vec; + use std::cmp::{Less, Equal, Greater}; + use std::int; + use std::num::{IntConvertible, Zero, One, FromStrRadix}; + use std::str; + use std::uint; + use std::vec; #[test] fn test_from_slice() { @@ -1623,15 +1621,14 @@ mod biguint_tests { #[cfg(test)] mod bigint_tests { - use core::prelude::*; use super::*; - use core::cmp::{Less, Equal, Greater}; - use core::int; - use core::num::{IntConvertible, Zero, One, FromStrRadix}; - use core::uint; - use core::vec; + use std::cmp::{Less, Equal, Greater}; + use std::int; + use std::num::{IntConvertible, Zero, One, FromStrRadix}; + use std::uint; + use std::vec; #[test] fn test_from_biguint() { diff --git a/src/libextra/num/complex.rs b/src/libextra/num/complex.rs index 3a63549cf3a..915523443fb 100644 --- a/src/libextra/num/complex.rs +++ b/src/libextra/num/complex.rs @@ -11,9 +11,8 @@ //! Complex numbers. -use core::prelude::*; -use core::num::{Zero,One,ToStrRadix}; +use std::num::{Zero,One,ToStrRadix}; // FIXME #1284: handle complex NaN & infinity etc. This // probably doesn't map to C's _Complex correctly. @@ -193,7 +192,7 @@ impl ToStrRadix for Cmplx { #[cfg(test)] mod test { use super::*; - use core::num::{Zero,One,Real}; + use std::num::{Zero,One,Real}; pub static _0_0i : Complex = Cmplx { re: 0f, im: 0f }; pub static _1_0i : Complex = Cmplx { re: 1f, im: 0f }; @@ -287,7 +286,7 @@ mod test { mod arith { use super::*; - use core::num::Zero; + use std::num::Zero; #[test] fn test_add() { diff --git a/src/libextra/num/rational.rs b/src/libextra/num/rational.rs index 339d35e2593..6733599d1ea 100644 --- a/src/libextra/num/rational.rs +++ b/src/libextra/num/rational.rs @@ -10,11 +10,10 @@ //! Rational numbers -use core::prelude::*; -use core::cmp; -use core::from_str::FromStr; -use core::num::{Zero,One,ToStrRadix,FromStrRadix,Round}; +use std::cmp; +use std::from_str::FromStr; +use std::num::{Zero,One,ToStrRadix,FromStrRadix,Round}; use super::bigint::BigInt; /// Represents the ratio between 2 numbers. @@ -277,11 +276,10 @@ impl #[cfg(test)] mod test { - use core::prelude::*; use super::*; - use core::num::{Zero,One,FromStrRadix,IntConvertible}; - use core::from_str::FromStr; + use std::num::{Zero,One,FromStrRadix,IntConvertible}; + use std::from_str::FromStr; pub static _0 : Rational = Ratio { numer: 0, denom: 1}; pub static _1 : Rational = Ratio { numer: 1, denom: 1}; diff --git a/src/libextra/par.rs b/src/libextra/par.rs index a3014cf8894..665633eedf8 100644 --- a/src/libextra/par.rs +++ b/src/libextra/par.rs @@ -8,13 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; -use core::cast; -use core::ptr; -use core::sys; -use core::uint; -use core::vec; +use std::cast; +use std::ptr; +use std::sys; +use std::uint; +use std::vec; use future_spawn = future::spawn; /** diff --git a/src/libextra/priority_queue.rs b/src/libextra/priority_queue.rs index fbb4be0febb..4c1163f3d50 100644 --- a/src/libextra/priority_queue.rs +++ b/src/libextra/priority_queue.rs @@ -12,11 +12,10 @@ #[allow(missing_doc)]; -use core::prelude::*; -use core::unstable::intrinsics::{move_val_init, init}; -use core::util::{replace, swap}; -use core::vec; +use std::unstable::intrinsics::{move_val_init, init}; +use std::util::{replace, swap}; +use std::vec; /// A priority queue implemented with a binary heap pub struct PriorityQueue { diff --git a/src/libextra/rc.rs b/src/libextra/rc.rs index 613c0b1ae41..86080b343c7 100644 --- a/src/libextra/rc.rs +++ b/src/libextra/rc.rs @@ -21,13 +21,12 @@ cycle cannot be created with `Rc` because there is no way to modify it after */ -use core::prelude::*; -use core::cast; -use core::libc::{c_void, size_t, malloc, free}; -use core::ptr; -use core::sys; -use core::unstable::intrinsics; +use std::cast; +use std::libc::{c_void, size_t, malloc, free}; +use std::ptr; +use std::sys; +use std::unstable::intrinsics; struct RcBox { value: T, @@ -104,7 +103,7 @@ impl DeepClone for Rc { #[cfg(test)] mod test_rc { use super::*; - use core::cell::Cell; + use std::cell::Cell; #[test] fn test_clone() { diff --git a/src/libextra/rl.rs b/src/libextra/rl.rs index 040adcc443d..693e3ecb53f 100644 --- a/src/libextra/rl.rs +++ b/src/libextra/rl.rs @@ -11,14 +11,13 @@ // FIXME #3921. This is unsafe because linenoise uses global mutable // state without mutexes. -use core::prelude::*; -use core::libc::{c_char, c_int}; -use core::local_data; -use core::str; +use std::libc::{c_char, c_int}; +use std::local_data; +use std::str; pub mod rustrt { - use core::libc::{c_char, c_int}; + use std::libc::{c_char, c_int}; pub extern { pub unsafe fn linenoise(prompt: *c_char) -> *c_char; diff --git a/src/libextra/rope.rs b/src/libextra/rope.rs index 71393ff9fae..8374c1a86e3 100644 --- a/src/libextra/rope.rs +++ b/src/libextra/rope.rs @@ -35,11 +35,10 @@ #[allow(missing_doc)]; -use core::prelude::*; -use core::uint; -use core::vec; -use core::str; +use std::uint; +use std::vec; +use std::str; /// The type of ropes. pub type Rope = node::Root; @@ -447,7 +446,6 @@ pub fn loop_leaves(rope: Rope, it: &fn(node::Leaf) -> bool) -> bool{ pub mod iterator { pub mod leaf { - use core::prelude::*; use rope::{Rope, node}; @@ -462,7 +460,6 @@ pub mod iterator { } } pub mod char { - use core::prelude::*; use rope::{Rope, node}; @@ -558,13 +555,12 @@ pub fn char_at(rope: Rope, pos: uint) -> char { Section: Implementation */ pub mod node { - use core::prelude::*; use rope::node; - use core::cast; - use core::uint; - use core::vec; + use std::cast; + use std::uint; + use std::vec; /// Implementation of type `rope` pub enum Root { @@ -1141,11 +1137,10 @@ pub mod node { } pub mod leaf_iterator { - use core::prelude::*; use rope::node::{Concat, Leaf, Node, height}; - use core::vec; + use std::vec; pub struct T { stack: ~[@Node], @@ -1184,7 +1179,6 @@ pub mod node { } pub mod char_iterator { - use core::prelude::*; use rope::node::{Leaf, Node}; use rope::node::leaf_iterator; @@ -1267,12 +1261,11 @@ pub mod node { #[cfg(test)] mod tests { - use core::prelude::*; use rope::*; - use core::uint; - use core::vec; + use std::uint; + use std::vec; //Utility function, used for sanity check fn rope_to_string(r: Rope) -> ~str { diff --git a/src/libextra/semver.rs b/src/libextra/semver.rs index cb372dd920d..6361de12719 100644 --- a/src/libextra/semver.rs +++ b/src/libextra/semver.rs @@ -12,15 +12,14 @@ #[allow(missing_doc)]; -use core::prelude::*; -use core::char; -use core::cmp; -use core::io::{ReaderUtil}; -use core::io; -use core::option::{Option, Some, None}; -use core::to_str::ToStr; -use core::uint; +use std::char; +use std::cmp; +use std::io::{ReaderUtil}; +use std::io; +use std::option::{Option, Some, None}; +use std::to_str::ToStr; +use std::uint; #[deriving(Eq)] pub enum Identifier { diff --git a/src/libextra/serialize.rs b/src/libextra/serialize.rs index 3d35d1332b2..66b178f49f7 100644 --- a/src/libextra/serialize.rs +++ b/src/libextra/serialize.rs @@ -17,13 +17,12 @@ Core encoding and decoding interfaces. #[allow(missing_doc)]; #[forbid(non_camel_case_types)]; -use core::prelude::*; -use core::at_vec; -use core::hashmap::{HashMap, HashSet}; -use core::trie::{TrieMap, TrieSet}; -use core::uint; -use core::vec; +use std::at_vec; +use std::hashmap::{HashMap, HashSet}; +use std::trie::{TrieMap, TrieSet}; +use std::uint; +use std::vec; use deque::Deque; use dlist::DList; use treemap::{TreeMap, TreeSet}; diff --git a/src/libextra/smallintmap.rs b/src/libextra/smallintmap.rs index 1d163922955..e32c688da37 100644 --- a/src/libextra/smallintmap.rs +++ b/src/libextra/smallintmap.rs @@ -15,13 +15,12 @@ #[allow(missing_doc)]; -use core::prelude::*; -use core::cmp; -use core::container::{Container, Mutable, Map, Set}; -use core::uint; -use core::util::replace; -use core::vec; +use std::cmp; +use std::container::{Container, Mutable, Map, Set}; +use std::uint; +use std::util::replace; +use std::vec; #[allow(missing_doc)] pub struct SmallIntMap { @@ -287,7 +286,6 @@ impl SmallIntSet { #[cfg(test)] mod tests { - use core::prelude::*; use super::SmallIntMap; @@ -382,11 +380,10 @@ mod tests { #[cfg(test)] mod test_set { - use core::prelude::*; use super::SmallIntSet; - use core::vec; + use std::vec; #[test] fn test_disjoint() { diff --git a/src/libextra/sort.rs b/src/libextra/sort.rs index 10dbe2326d7..36c12f314b7 100644 --- a/src/libextra/sort.rs +++ b/src/libextra/sort.rs @@ -10,12 +10,11 @@ //! Sorting methods -use core::prelude::*; -use core::cmp::{Eq, Ord}; -use core::uint; -use core::util::swap; -use core::vec; +use std::cmp::{Eq, Ord}; +use std::uint; +use std::util::swap; +use std::vec; type Le<'self, T> = &'self fn(v1: &T, v2: &T) -> bool; @@ -791,12 +790,11 @@ mod test_qsort3 { #[cfg(test)] mod test_qsort { - use core::prelude::*; use sort::*; - use core::int; - use core::vec; + use std::int; + use std::vec; fn check_sort(v1: &mut [int], v2: &mut [int]) { let len = v1.len(); @@ -857,7 +855,6 @@ mod test_qsort { #[cfg(test)] mod tests { - use core::prelude::*; use sort::*; @@ -924,12 +921,11 @@ mod tests { #[cfg(test)] mod test_tim_sort { - use core::prelude::*; use sort::tim_sort; - use core::rand::RngUtil; - use core::rand; - use core::vec; + use std::rand::RngUtil; + use std::rand; + use std::vec; struct CVal { val: float, @@ -1019,15 +1015,14 @@ mod test_tim_sort { #[cfg(test)] mod big_tests { - use core::prelude::*; use sort::*; - use core::local_data; - use core::rand::RngUtil; - use core::rand; - use core::uint; - use core::vec; + use std::local_data; + use std::rand::RngUtil; + use std::rand; + use std::uint; + use std::vec; #[test] fn test_unique() { diff --git a/src/libextra/stats.rs b/src/libextra/stats.rs index 69f75037c7e..8351e4db6b8 100644 --- a/src/libextra/stats.rs +++ b/src/libextra/stats.rs @@ -10,12 +10,11 @@ #[allow(missing_doc)]; -use core::prelude::*; -use core::f64; -use core::cmp; -use core::num; -use core::vec; +use std::f64; +use std::cmp; +use std::num; +use std::vec; use sort; // NB: this can probably be rewritten in terms of num::Num diff --git a/src/libextra/sync.rs b/src/libextra/sync.rs index 9c6be901d98..b9d25451a8a 100644 --- a/src/libextra/sync.rs +++ b/src/libextra/sync.rs @@ -15,14 +15,13 @@ * in std. */ -use core::prelude::*; -use core::borrow; -use core::comm; -use core::task; -use core::unstable::sync::{Exclusive, exclusive, UnsafeAtomicRcBox}; -use core::unstable::atomics; -use core::util; +use std::borrow; +use std::comm; +use std::task; +use std::unstable::sync::{Exclusive, exclusive, UnsafeAtomicRcBox}; +use std::unstable::atomics; +use std::util; /**************************************************************************** * Internals @@ -803,15 +802,14 @@ impl<'self> RWlockReadMode<'self> { #[cfg(test)] mod tests { - use core::prelude::*; use sync::*; - use core::cast; - use core::cell::Cell; - use core::comm; - use core::result; - use core::task; + use std::cast; + use std::cell::Cell; + use std::comm; + use std::result; + use std::task; /************************************************************************ * Semaphore tests diff --git a/src/libextra/task_pool.rs b/src/libextra/task_pool.rs index 6a715d7b481..49d5dd93869 100644 --- a/src/libextra/task_pool.rs +++ b/src/libextra/task_pool.rs @@ -13,15 +13,14 @@ /// A task pool abstraction. Useful for achieving predictable CPU /// parallelism. -use core::prelude::*; -use core::comm::Chan; -use core::comm; -use core::task::SchedMode; -use core::task; -use core::vec; +use std::comm::Chan; +use std::comm; +use std::task::SchedMode; +use std::task; +use std::vec; -#[cfg(test)] use core::task::SingleThreaded; +#[cfg(test)] use std::task::SingleThreaded; enum Msg { Execute(~fn(&T)), diff --git a/src/libextra/tempfile.rs b/src/libextra/tempfile.rs index 39dcee5eff3..f8948f41101 100644 --- a/src/libextra/tempfile.rs +++ b/src/libextra/tempfile.rs @@ -10,11 +10,10 @@ //! Temporary files and directories -use core::prelude::*; -use core::os; -use core::rand::RngUtil; -use core::rand; +use std::os; +use std::rand::RngUtil; +use std::rand; /// Attempts to make a temporary directory inside of `tmpdir` whose name will /// have the suffix `suffix`. If no directory can be created, None is returned. @@ -31,11 +30,10 @@ pub fn mkdtemp(tmpdir: &Path, suffix: &str) -> Option { #[cfg(test)] mod tests { - use core::prelude::*; use tempfile::mkdtemp; - use core::os; + use std::os; #[test] fn test_mkdtemp() { @@ -44,12 +42,12 @@ mod tests { assert!(p.to_str().ends_with("foobar")); } - // Ideally these would be in core::os but then core would need + // Ideally these would be in std::os but then core would need // to depend on std #[test] fn recursive_mkdir_rel() { - use core::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; - use core::os; + use std::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; + use std::os; let root = mkdtemp(&os::tmpdir(), "recursive_mkdir_rel"). expect("recursive_mkdir_rel"); @@ -67,8 +65,8 @@ mod tests { #[test] fn recursive_mkdir_dot() { - use core::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; - use core::os; + use std::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; + use std::os; let dot = Path("."); assert!(os::mkdir_recursive(&dot, (S_IRUSR | S_IWUSR | S_IXUSR) as i32)); @@ -78,8 +76,8 @@ mod tests { #[test] fn recursive_mkdir_rel_2() { - use core::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; - use core::os; + use std::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; + use std::os; let root = mkdtemp(&os::tmpdir(), "recursive_mkdir_rel_2"). expect("recursive_mkdir_rel_2"); @@ -102,8 +100,8 @@ mod tests { // Ideally this would be in core, but needs mkdtemp #[test] pub fn test_rmdir_recursive_ok() { - use core::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; - use core::os; + use std::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; + use std::os; let rwx = (S_IRUSR | S_IWUSR | S_IXUSR) as i32; diff --git a/src/libextra/term.rs b/src/libextra/term.rs index d448a1588a6..e21e5c5fb58 100644 --- a/src/libextra/term.rs +++ b/src/libextra/term.rs @@ -12,11 +12,10 @@ #[allow(missing_doc)]; -use core::prelude::*; -use core::io; +use std::io; -#[cfg(not(target_os = "win32"))] use core::os; +#[cfg(not(target_os = "win32"))] use std::os; #[cfg(not(target_os = "win32"))] use terminfo::*; #[cfg(not(target_os = "win32"))] use terminfo::searcher::open; #[cfg(not(target_os = "win32"))] use terminfo::parser::compiled::parse; diff --git a/src/libextra/terminfo/parm.rs b/src/libextra/terminfo/parm.rs index 5180a71939c..f3edd81f9ac 100644 --- a/src/libextra/terminfo/parm.rs +++ b/src/libextra/terminfo/parm.rs @@ -10,10 +10,9 @@ //! Parameterized string expansion -use core::prelude::*; -use core::{char, vec, util}; -use core::num::strconv::{SignNone,SignNeg,SignAll,DigAll,to_str_bytes_common}; -use core::iterator::IteratorUtil; +use std::{char, vec, util}; +use std::num::strconv::{SignNone,SignNeg,SignAll,DigAll,to_str_bytes_common}; +use std::iterator::IteratorUtil; #[deriving(Eq)] enum States { @@ -549,7 +548,7 @@ priv fn format(val: Param, op: FormatOp, flags: Flags) -> Result<~[u8],~str> { #[cfg(test)] mod test { use super::*; - use core::result::Ok; + use std::result::Ok; #[test] fn test_basic_setabf() { diff --git a/src/libextra/terminfo/parser/compiled.rs b/src/libextra/terminfo/parser/compiled.rs index 123a388900b..2f36845d79b 100644 --- a/src/libextra/terminfo/parser/compiled.rs +++ b/src/libextra/terminfo/parser/compiled.rs @@ -10,11 +10,10 @@ /// ncurses-compatible compiled terminfo format parsing (term(5)) -use core::prelude::*; -use core::{vec, int, str}; -use core::io::Reader; -use core::hashmap::HashMap; +use std::{vec, int, str}; +use std::io::Reader; +use std::hashmap::HashMap; use super::super::TermInfo; // These are the orders ncurses uses in its compiled format (as of 5.9). Not sure if portable. diff --git a/src/libextra/terminfo/searcher.rs b/src/libextra/terminfo/searcher.rs index da12a1c4203..15aeeb3e654 100644 --- a/src/libextra/terminfo/searcher.rs +++ b/src/libextra/terminfo/searcher.rs @@ -11,11 +11,10 @@ /// Implement ncurses-compatible database discovery /// Does not support hashed database, only filesystem! -use core::prelude::*; -use core::{os, str}; -use core::os::getenv; -use core::io::{file_reader, Reader}; -use path = core::path::Path; +use std::{os, str}; +use std::os::getenv; +use std::io::{file_reader, Reader}; +use path = std::path::Path; /// Return path to database entry for `term` pub fn get_dbpath_for_term(term: &str) -> Option<~path> { diff --git a/src/libextra/terminfo/terminfo.rs b/src/libextra/terminfo/terminfo.rs index 141a5b6bf7f..0e0231ad3f4 100644 --- a/src/libextra/terminfo/terminfo.rs +++ b/src/libextra/terminfo/terminfo.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::hashmap::HashMap; +use std::hashmap::HashMap; /// A parsed terminfo entry. pub struct TermInfo { diff --git a/src/libextra/test.rs b/src/libextra/test.rs index 50ca96e6e21..886bb9293bb 100644 --- a/src/libextra/test.rs +++ b/src/libextra/test.rs @@ -15,7 +15,6 @@ // simplest interface possible for representing and running tests // while providing a base that other test frameworks may build off of. -use core::prelude::*; use getopts; use sort; @@ -23,22 +22,22 @@ use stats::Stats; use term; use time::precise_time_ns; -use core::comm::{stream, SharedChan}; -use core::either; -use core::io; -use core::num; -use core::option; -use core::rand::RngUtil; -use core::rand; -use core::result; -use core::task; -use core::to_str::ToStr; -use core::u64; -use core::uint; -use core::vec; +use std::comm::{stream, SharedChan}; +use std::either; +use std::io; +use std::num; +use std::option; +use std::rand::RngUtil; +use std::rand; +use std::result; +use std::task; +use std::to_str::ToStr; +use std::u64; +use std::uint; +use std::vec; pub mod rustrt { - use core::libc::size_t; + use std::libc::size_t; #[abi = "cdecl"] pub extern { @@ -573,7 +572,7 @@ pub fn run_test(force_ignore: bool, fn run_test_inner(desc: TestDesc, monitor_ch: SharedChan, testfn: ~fn()) { - let testfn_cell = ::core::cell::Cell::new(testfn); + let testfn_cell = ::std::cell::Cell::new(testfn); do task::spawn { let mut result_future = None; // task::future_result(builder); @@ -781,10 +780,10 @@ mod tests { StaticTestName, DynTestName, DynTestFn}; use test::{TestOpts, run_test}; - use core::either; - use core::comm::{stream, SharedChan}; - use core::option; - use core::vec; + use std::either; + use std::comm::{stream, SharedChan}; + use std::option; + use std::vec; #[test] pub fn do_not_run_ignored_tests() { diff --git a/src/libextra/time.rs b/src/libextra/time.rs index 931a42d3c53..e1f42934b39 100644 --- a/src/libextra/time.rs +++ b/src/libextra/time.rs @@ -10,12 +10,11 @@ #[allow(missing_doc)]; -use core::prelude::*; -use core::i32; -use core::int; -use core::io; -use core::str; +use std::i32; +use std::int; +use std::io; +use std::str; static NSEC_PER_SEC: i32 = 1_000_000_000_i32; @@ -862,11 +861,11 @@ priv fn do_strftime(format: &str, tm: &Tm) -> ~str { mod tests { use time::*; - use core::float; - use core::os; - use core::result; - use core::result::{Err, Ok}; - use core::str; + use std::float; + use std::os; + use std::result; + use std::result::{Err, Ok}; + use std::str; fn test_get_time() { static some_recent_date: i64 = 1325376000i64; // 2012-01-01T00:00:00Z diff --git a/src/libextra/timer.rs b/src/libextra/timer.rs index e23f9113319..d957ac43801 100644 --- a/src/libextra/timer.rs +++ b/src/libextra/timer.rs @@ -10,18 +10,17 @@ //! Utilities that leverage libuv's `uv_timer_*` API -use core::prelude::*; use uv; use uv::iotask; use uv::iotask::IoTask; -use core::cast::transmute; -use core::cast; -use core::comm::{stream, Chan, SharedChan, Port, select2i}; -use core::either; -use core::libc::c_void; -use core::libc; +use std::cast::transmute; +use std::cast; +use std::comm::{stream, Chan, SharedChan, Port, select2i}; +use std::either; +use std::libc::c_void; +use std::libc; /** * Wait for timeout period then send provided value over a channel @@ -111,7 +110,7 @@ pub fn sleep(iotask: &IoTask, msecs: uint) { * * * `iotask' - `uv::iotask` that the tcp request will run on * * msecs - an mount of time, in milliseconds, to wait to receive - * * wait_port - a `core::comm::port` to receive on + * * wait_port - a `std::comm::port` to receive on * * # Returns * @@ -176,16 +175,15 @@ extern fn delayed_send_close_cb(handle: *uv::ll::uv_timer_t) { #[cfg(test)] mod test { - use core::prelude::*; use timer::*; use uv; - use core::cell::Cell; - use core::pipes::{stream, SharedChan}; - use core::rand::RngUtil; - use core::rand; - use core::task; + use std::cell::Cell; + use std::pipes::{stream, SharedChan}; + use std::rand::RngUtil; + use std::rand; + use std::task; #[test] fn test_gl_timer_simple_sleep_test() { @@ -223,7 +221,7 @@ mod test { let ch = ch.clone(); let hl_loop_clone = hl_loop.clone(); do task::spawn { - use core::rand::*; + use std::rand::*; let mut rng = rng(); for times.times { sleep(&hl_loop_clone, rng.next() as uint % maxms); diff --git a/src/libextra/treemap.rs b/src/libextra/treemap.rs index d546b48f817..1a21d549d6c 100644 --- a/src/libextra/treemap.rs +++ b/src/libextra/treemap.rs @@ -12,10 +12,9 @@ //! trees. The only requirement for the types is that the key implements //! `TotalOrd`. -use core::prelude::*; -use core::uint; -use core::util::{swap, replace}; +use std::uint; +use std::util::{swap, replace}; // This is implemented as an AA tree, which is a simplified variation of // a red-black tree where red (horizontal) nodes can only be added @@ -689,12 +688,11 @@ fn remove(node: &mut Option<~TreeNode>, #[cfg(test)] mod test_treemap { - use core::prelude::*; use super::*; - use core::rand::RngUtil; - use core::rand; + use std::rand::RngUtil; + use std::rand; #[test] fn find_empty() { @@ -1010,7 +1008,6 @@ mod test_treemap { #[cfg(test)] mod test_set { - use core::prelude::*; use super::*; diff --git a/src/libextra/uv_global_loop.rs b/src/libextra/uv_global_loop.rs index f1dde1b8cb4..5501d73ac86 100644 --- a/src/libextra/uv_global_loop.rs +++ b/src/libextra/uv_global_loop.rs @@ -10,16 +10,15 @@ //! A process-wide libuv event loop for library use. -use core::prelude::*; use iotask = uv_iotask; use uv_iotask::{IoTask, spawn_iotask}; -use core::comm::Chan; -use core::option::{Some, None}; -use core::task::task; -use core::unstable::global::{global_data_clone_create, global_data_clone}; -use core::unstable::weak_task::weaken_task; +use std::comm::Chan; +use std::option::{Some, None}; +use std::task::task; +use std::unstable::global::{global_data_clone_create, global_data_clone}; +use std::unstable::weak_task::weaken_task; /** * Race-free helper to get access to a global task where a libuv @@ -126,11 +125,11 @@ mod test { use uv::ll; use uv_iotask::IoTask; - use core::libc; - use core::task; - use core::cast::transmute; - use core::libc::c_void; - use core::comm::{stream, SharedChan, Chan}; + use std::libc; + use std::task; + use std::cast::transmute; + use std::libc::c_void; + use std::comm::{stream, SharedChan, Chan}; extern fn simple_timer_close_cb(timer_ptr: *ll::uv_timer_t) { unsafe { diff --git a/src/libextra/uv_iotask.rs b/src/libextra/uv_iotask.rs index 817dfa28aee..0a564045d32 100644 --- a/src/libextra/uv_iotask.rs +++ b/src/libextra/uv_iotask.rs @@ -17,14 +17,13 @@ #[allow(missing_doc)]; -use core::prelude::*; use ll = uv_ll; -use core::comm::{stream, Port, Chan, SharedChan}; -use core::libc::c_void; -use core::libc; -use core::task; +use std::comm::{stream, Port, Chan, SharedChan}; +use std::libc::c_void; +use std::libc; +use std::task; /// Used to abstract-away direct interaction with a libuv loop. pub struct IoTask { @@ -226,7 +225,7 @@ struct AhData { #[cfg(test)] fn impl_uv_iotask_async(iotask: &IoTask) { - use core::ptr; + use std::ptr; let async_handle = ll::async_t(); let ah_ptr: *ll::uv_async_t = &async_handle; diff --git a/src/libextra/uv_ll.rs b/src/libextra/uv_ll.rs index 58b477d4ccf..db960f334fd 100644 --- a/src/libextra/uv_ll.rs +++ b/src/libextra/uv_ll.rs @@ -33,14 +33,13 @@ #[allow(non_camel_case_types)]; // C types #[allow(missing_doc)]; -use core::prelude::*; -use core::libc::{c_void, size_t}; -use core::libc; -use core::ptr::to_unsafe_ptr; -use core::ptr; -use core::str; -use core::vec; +use std::libc::{c_void, size_t}; +use std::libc; +use std::ptr::to_unsafe_ptr; +use std::ptr; +use std::str; +use std::vec; pub type uv_handle_t = c_void; pub type uv_loop_t = c_void; @@ -362,7 +361,7 @@ pub struct uv_getaddrinfo_t { pub mod uv_ll_struct_stubgen { - use core::ptr; + use std::ptr; use super::{ uv_async_t, @@ -1228,16 +1227,15 @@ pub unsafe fn addrinfo_as_sockaddr_in6(input: *addrinfo) -> *sockaddr_in6 { #[cfg(test)] mod test { - use core::prelude::*; use super::*; - use core::comm::{SharedChan, stream, GenericChan, GenericPort}; - use core::libc; - use core::str; - use core::sys; - use core::task; - use core::vec; + use std::comm::{SharedChan, stream, GenericChan, GenericPort}; + use std::libc; + use std::str; + use std::sys; + use std::task; + use std::vec; enum tcp_read_data { tcp_read_eof, diff --git a/src/libextra/workcache.rs b/src/libextra/workcache.rs index 4d4f3c3a49b..503bd05b733 100644 --- a/src/libextra/workcache.rs +++ b/src/libextra/workcache.rs @@ -10,7 +10,6 @@ #[allow(missing_doc)]; -use core::prelude::*; use digest::DigestUtil; use json; @@ -18,17 +17,17 @@ use sha1::Sha1; use serialize::{Encoder, Encodable, Decoder, Decodable}; use sort; -use core::cell::Cell; -use core::cmp; -use core::comm::{PortOne, oneshot, send_one, recv_one}; -use core::either::{Either, Left, Right}; -use core::hashmap::HashMap; -use core::io; -use core::result; -use core::run; -use core::task; -use core::to_bytes; -use core::util::replace; +use std::cell::Cell; +use std::cmp; +use std::comm::{PortOne, oneshot, send_one, recv_one}; +use std::either::{Either, Left, Right}; +use std::hashmap::HashMap; +use std::io; +use std::result; +use std::run; +use std::task; +use std::to_bytes; +use std::util::replace; /** * @@ -403,7 +402,7 @@ fn unwrap bool { match ot { @@ -537,7 +534,7 @@ pub fn build_link_meta(sess: Session, write_string(symbol_hasher, len_and_str(*dh)); } - // tjc: allocation is unfortunate; need to change core::hash + // tjc: allocation is unfortunate; need to change std::hash return truncated_hash_result(symbol_hasher).to_managed(); } @@ -618,7 +615,7 @@ pub fn symbol_hash(tcx: ty::ctxt, let mut hash = truncated_hash_result(symbol_hasher); // Prefix with _ so that it never blends into adjacent digits hash.unshift_char('_'); - // tjc: allocation is unfortunate; need to change core::hash + // tjc: allocation is unfortunate; need to change std::hash hash.to_managed() } diff --git a/src/librustc/back/passes.rs b/src/librustc/back/passes.rs index d2b4c87c744..c1192707c1c 100644 --- a/src/librustc/back/passes.rs +++ b/src/librustc/back/passes.rs @@ -8,9 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; -use core::str; -use core::io; +use std::str; +use std::io; use driver::session::{OptLevel, No, Less, Aggressive}; use driver::session::{Session}; diff --git a/src/librustc/back/rpath.rs b/src/librustc/back/rpath.rs index dce2b7fe3df..ab107a8bf25 100644 --- a/src/librustc/back/rpath.rs +++ b/src/librustc/back/rpath.rs @@ -8,17 +8,16 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use driver::session; use metadata::cstore; use metadata::filesearch; -use core::hashmap::HashSet; -use core::os; -use core::uint; -use core::util; -use core::vec; +use std::hashmap::HashSet; +use std::os; +use std::uint; +use std::util; +use std::vec; fn not_win32(os: session::os) -> bool { os != session::os_win32 @@ -113,7 +112,7 @@ pub fn get_rpath_relative_to_output(os: session::os, output: &Path, lib: &Path) -> Path { - use core::os; + use std::os; assert!(not_win32(os)); @@ -195,8 +194,7 @@ pub fn minimize_rpaths(rpaths: &[Path]) -> ~[Path] { #[cfg(unix, test)] mod test { - use core::prelude::*; - use core::os; + use std::os; // FIXME(#2119): the outer attribute should be #[cfg(unix, test)], then // these redundant #[cfg(test)] blocks can be removed diff --git a/src/librustc/driver/driver.rs b/src/librustc/driver/driver.rs index 18693b52fc8..a32f54fe7bb 100644 --- a/src/librustc/driver/driver.rs +++ b/src/librustc/driver/driver.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use back::link; use back::{arm, x86, x86_64, mips}; @@ -24,11 +23,11 @@ use middle; use util::common::time; use util::ppaux; -use core::hashmap::HashMap; -use core::int; -use core::io; -use core::os; -use core::vec; +use std::hashmap::HashMap; +use std::int; +use std::io; +use std::os; +use std::vec; use extra::getopts::groups::{optopt, optmulti, optflag, optflagopt}; use extra::getopts::{opt_present}; use extra::getopts; @@ -951,7 +950,6 @@ pub fn list_metadata(sess: Session, path: &Path, out: @io::Writer) { #[cfg(test)] mod test { - use core::prelude::*; use driver::driver::{build_configuration, build_session}; use driver::driver::{build_session_options, optgroups, str_input}; diff --git a/src/librustc/driver/session.rs b/src/librustc/driver/session.rs index 9459116307d..ef0b6d64651 100644 --- a/src/librustc/driver/session.rs +++ b/src/librustc/driver/session.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use back::link; use back::target_strs; @@ -29,7 +28,7 @@ use syntax::abi; use syntax::parse::token; use syntax; -use core::hashmap::HashMap; +use std::hashmap::HashMap; #[deriving(Eq)] pub enum os { os_win32, os_macos, os_linux, os_android, os_freebsd, } diff --git a/src/librustc/front/config.rs b/src/librustc/front/config.rs index 43098b98ea3..7d9fac5c6ae 100644 --- a/src/librustc/front/config.rs +++ b/src/librustc/front/config.rs @@ -8,10 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; -use core::option; -use core::vec; +use std::option; +use std::vec; use syntax::{ast, fold, attr}; type in_cfg_pred = @fn(attrs: ~[ast::attribute]) -> bool; diff --git a/src/librustc/front/std_inject.rs b/src/librustc/front/std_inject.rs index a86e7c5e39b..88ed39aae54 100644 --- a/src/librustc/front/std_inject.rs +++ b/src/librustc/front/std_inject.rs @@ -8,11 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use driver::session::Session; -use core::vec; +use std::vec; use syntax::ast; use syntax::attr; use syntax::codemap::dummy_sp; diff --git a/src/librustc/front/test.rs b/src/librustc/front/test.rs index 97f1b3997dd..cfd4df7403f 100644 --- a/src/librustc/front/test.rs +++ b/src/librustc/front/test.rs @@ -10,12 +10,11 @@ // Code that generates a test runner to run all the tests in a crate -use core::prelude::*; use driver::session; use front::config; -use core::vec; +use std::vec; use syntax::ast_util::*; use syntax::attr; use syntax::codemap::{dummy_sp, span, ExpandedFrom, CallInfo, NameAndSpan}; diff --git a/src/librustc/lib/llvm.rs b/src/librustc/lib/llvm.rs index 41349d9c085..8ca8c12f412 100644 --- a/src/librustc/lib/llvm.rs +++ b/src/librustc/lib/llvm.rs @@ -8,12 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; -use core::hashmap::HashMap; -use core::libc::{c_uint, c_ushort}; -use core::option; -use core::str; +use std::hashmap::HashMap; +use std::libc::{c_uint, c_ushort}; +use std::option; +use std::str; use middle::trans::type_::Type; @@ -268,7 +267,7 @@ pub mod llvm { use super::{SectionIteratorRef, TargetDataRef, TypeKind, TypeRef, UseRef}; use super::{ValueRef, PassRef}; use super::debuginfo::*; - use core::libc::{c_char, c_int, c_longlong, c_ushort, c_uint, c_ulonglong}; + use std::libc::{c_char, c_int, c_longlong, c_ushort, c_uint, c_ulonglong}; #[link_args = "-Lrustllvm -lrustllvm"] #[link_name = "rustllvm"] diff --git a/src/librustc/metadata/common.rs b/src/librustc/metadata/common.rs index e7725436f2b..ddd07c2cb27 100644 --- a/src/librustc/metadata/common.rs +++ b/src/librustc/metadata/common.rs @@ -7,8 +7,7 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; -use core::cast; +use std::cast; // EBML enum definitions and utils shared by the encoder and decoder diff --git a/src/librustc/metadata/creader.rs b/src/librustc/metadata/creader.rs index 5e36b8fddcc..2a712b07564 100644 --- a/src/librustc/metadata/creader.rs +++ b/src/librustc/metadata/creader.rs @@ -10,14 +10,13 @@ //! Validates all used crates and extern libraries and loads their metadata -use core::prelude::*; use metadata::cstore; use metadata::decoder; use metadata::filesearch::FileSearch; use metadata::loader; -use core::hashmap::HashMap; +use std::hashmap::HashMap; use syntax::attr; use syntax::codemap::{span, dummy_sp}; use syntax::diagnostic::span_handler; @@ -75,7 +74,7 @@ fn dump_crates(crate_cache: &[cache_entry]) { fn warn_if_multiple_versions(e: @mut Env, diag: @span_handler, crate_cache: &[cache_entry]) { - use core::either::*; + use std::either::*; if crate_cache.len() != 0u { let name = loader::crate_name_from_metas( diff --git a/src/librustc/metadata/csearch.rs b/src/librustc/metadata/csearch.rs index 4ede9f96f1f..f336b0f4e4c 100644 --- a/src/librustc/metadata/csearch.rs +++ b/src/librustc/metadata/csearch.rs @@ -10,7 +10,6 @@ // Searching for information from the cstore -use core::prelude::*; use metadata::common::*; use metadata::cstore; @@ -18,7 +17,7 @@ use metadata::decoder; use metadata; use middle::{ty, resolve}; -use core::vec; +use std::vec; use reader = extra::ebml::reader; use syntax::ast; use syntax::ast_map; diff --git a/src/librustc/metadata/cstore.rs b/src/librustc/metadata/cstore.rs index b0a955fef8f..af5cc9136bd 100644 --- a/src/librustc/metadata/cstore.rs +++ b/src/librustc/metadata/cstore.rs @@ -12,13 +12,12 @@ // The crate store - a central repo for information collected about external // crates and libraries -use core::prelude::*; use metadata::cstore; use metadata::decoder; -use core::hashmap::HashMap; -use core::vec; +use std::hashmap::HashMap; +use std::vec; use extra; use syntax::ast; use syntax::parse::token::ident_interner; diff --git a/src/librustc/metadata/decoder.rs b/src/librustc/metadata/decoder.rs index 69faf519bc2..a7a69effe65 100644 --- a/src/librustc/metadata/decoder.rs +++ b/src/librustc/metadata/decoder.rs @@ -10,7 +10,6 @@ // Decoding metadata from a single crate's metadata -use core::prelude::*; use metadata::cstore::crate_metadata; use metadata::common::*; @@ -23,13 +22,13 @@ use metadata::tydecode::{parse_ty_data, parse_def_id, parse_bare_fn_ty_data, parse_trait_ref_data}; use middle::{ty, resolve}; -use core::hash::HashUtil; -use core::int; -use core::io::WriterUtil; -use core::io; -use core::option; -use core::str; -use core::vec; +use std::hash::HashUtil; +use std::int; +use std::io::WriterUtil; +use std::io; +use std::option; +use std::str; +use std::vec; use extra::ebml::reader; use extra::ebml; use extra::serialize::Decodable; diff --git a/src/librustc/metadata/encoder.rs b/src/librustc/metadata/encoder.rs index e394c8dcf92..85fca077d88 100644 --- a/src/librustc/metadata/encoder.rs +++ b/src/librustc/metadata/encoder.rs @@ -10,7 +10,6 @@ // Metadata encoding -use core::prelude::*; use metadata::common::*; use metadata::cstore; @@ -21,13 +20,13 @@ use middle::ty; use middle; use util::ppaux::ty_to_str; -use core::hash::HashUtil; -use core::hashmap::{HashMap, HashSet}; -use core::int; -use core::io; -use core::str; -use core::uint; -use core::vec; +use std::hash::HashUtil; +use std::hashmap::{HashMap, HashSet}; +use std::int; +use std::io; +use std::str; +use std::uint; +use std::vec; use extra::flate; use extra::serialize::Encodable; use extra; @@ -46,7 +45,7 @@ use syntax::parse::token; use syntax; use writer = extra::ebml::writer; -use core::cast; +use std::cast; // used by astencode: type abbrev_map = @mut HashMap; diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs index abfb5f7d4d4..28866fd568a 100644 --- a/src/librustc/metadata/filesearch.rs +++ b/src/librustc/metadata/filesearch.rs @@ -8,12 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; -use core::option; -use core::os; -use core::result; -use core::str; +use std::option; +use std::os; +use std::result; +use std::str; // A module for searching for libraries // FIXME (#2658): I'm not happy how this module turned out. Should diff --git a/src/librustc/metadata/loader.rs b/src/librustc/metadata/loader.rs index 9e0d6fb8e3a..31577e47267 100644 --- a/src/librustc/metadata/loader.rs +++ b/src/librustc/metadata/loader.rs @@ -10,7 +10,6 @@ //! Finds crate binaries and loads their metadata -use core::prelude::*; use lib::llvm::{False, llvm, mk_object_file, mk_section_iter}; use metadata::decoder; @@ -24,14 +23,14 @@ use syntax::parse::token::ident_interner; use syntax::print::pprust; use syntax::{ast, attr}; -use core::cast; -use core::io; -use core::option; -use core::os::consts::{macos, freebsd, linux, android, win32}; -use core::ptr; -use core::str; -use core::uint; -use core::vec; +use std::cast; +use std::io; +use std::option; +use std::os::consts::{macos, freebsd, linux, android, win32}; +use std::ptr; +use std::str; +use std::uint; +use std::vec; use extra::flate; pub enum os { diff --git a/src/librustc/metadata/tydecode.rs b/src/librustc/metadata/tydecode.rs index 22786581073..c1fbde524c0 100644 --- a/src/librustc/metadata/tydecode.rs +++ b/src/librustc/metadata/tydecode.rs @@ -14,12 +14,11 @@ // tjc note: Would be great to have a `match check` macro equivalent // for some of these -use core::prelude::*; use middle::ty; -use core::str; -use core::uint; +use std::str; +use std::uint; use syntax::abi::AbiSet; use syntax::abi; use syntax::ast; diff --git a/src/librustc/metadata/tyencode.rs b/src/librustc/metadata/tyencode.rs index fb72617b743..1295653f806 100644 --- a/src/librustc/metadata/tyencode.rs +++ b/src/librustc/metadata/tyencode.rs @@ -10,15 +10,14 @@ // Type encoding -use core::prelude::*; use middle::ty::param_ty; use middle::ty; -use core::hashmap::HashMap; -use core::io::WriterUtil; -use core::io; -use core::uint; +use std::hashmap::HashMap; +use std::io::WriterUtil; +use std::io; +use std::uint; use syntax::abi::AbiSet; use syntax::ast; use syntax::ast::*; diff --git a/src/librustc/middle/astencode.rs b/src/librustc/middle/astencode.rs index 16e3bd34cdd..c6d7314f1cd 100644 --- a/src/librustc/middle/astencode.rs +++ b/src/librustc/middle/astencode.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use c = metadata::common; use cstore = metadata::cstore; @@ -24,8 +23,8 @@ use middle::{ty, typeck, moves}; use middle; use util::ppaux::ty_to_str; -use core::at_vec; -use core::uint; +use std::at_vec; +use std::uint; use extra::ebml::reader; use extra::ebml; use extra::serialize; @@ -43,7 +42,7 @@ use syntax::parse::token; use syntax; use writer = extra::ebml::writer; -use core::cast; +use std::cast; #[cfg(test)] use syntax::parse; #[cfg(test)] use syntax::print::pprust; @@ -1243,7 +1242,7 @@ fn mk_ctxt() -> @fake_ext_ctxt { #[cfg(test)] fn roundtrip(in_item: Option<@ast::item>) { - use core::io; + use std::io; let in_item = in_item.get(); let bytes = do io::with_bytes_writer |wr| { diff --git a/src/librustc/middle/borrowck/check_loans.rs b/src/librustc/middle/borrowck/check_loans.rs index 5730eb0d9bd..b2e303d40ee 100644 --- a/src/librustc/middle/borrowck/check_loans.rs +++ b/src/librustc/middle/borrowck/check_loans.rs @@ -17,10 +17,9 @@ // 3. assignments do not affect things loaned out as immutable // 4. moves do not affect things loaned out in any way -use core::prelude::*; -use core::hashmap::HashSet; -use core::uint; +use std::hashmap::HashSet; +use std::uint; use mc = middle::mem_categorization; use middle::borrowck::*; use middle::moves; diff --git a/src/librustc/middle/borrowck/gather_loans/gather_moves.rs b/src/librustc/middle/borrowck/gather_loans/gather_moves.rs index e950610cce6..c9ea9e2be66 100644 --- a/src/librustc/middle/borrowck/gather_loans/gather_moves.rs +++ b/src/librustc/middle/borrowck/gather_loans/gather_moves.rs @@ -12,7 +12,6 @@ * Computes moves. */ -use core::prelude::*; use mc = middle::mem_categorization; use middle::borrowck::*; use middle::borrowck::move_data::*; diff --git a/src/librustc/middle/borrowck/gather_loans/lifetime.rs b/src/librustc/middle/borrowck/gather_loans/lifetime.rs index 131ee5aa067..05fc139305c 100644 --- a/src/librustc/middle/borrowck/gather_loans/lifetime.rs +++ b/src/librustc/middle/borrowck/gather_loans/lifetime.rs @@ -11,7 +11,6 @@ //! This module implements the check that the lifetime of a borrow //! does not exceed the lifetime of the value being borrowed. -use core::prelude::*; use middle::borrowck::*; use mc = middle::mem_categorization; diff --git a/src/librustc/middle/borrowck/gather_loans/mod.rs b/src/librustc/middle/borrowck/gather_loans/mod.rs index 9d8fdb06278..26fa4924ccb 100644 --- a/src/librustc/middle/borrowck/gather_loans/mod.rs +++ b/src/librustc/middle/borrowck/gather_loans/mod.rs @@ -16,7 +16,6 @@ // their associated scopes. In phase two, checking loans, we will then make // sure that all of these loans are honored. -use core::prelude::*; use middle::borrowck::*; use middle::borrowck::move_data::MoveData; diff --git a/src/librustc/middle/borrowck/gather_loans/restrictions.rs b/src/librustc/middle/borrowck/gather_loans/restrictions.rs index 5f4251ad0a4..d5377aeb618 100644 --- a/src/librustc/middle/borrowck/gather_loans/restrictions.rs +++ b/src/librustc/middle/borrowck/gather_loans/restrictions.rs @@ -10,9 +10,8 @@ //! Computes the restrictions that result from a borrow. -use core::prelude::*; -use core::vec; +use std::vec; use middle::borrowck::*; use mc = middle::mem_categorization; use middle::ty; diff --git a/src/librustc/middle/borrowck/mod.rs b/src/librustc/middle/borrowck/mod.rs index f22edd2e1d6..7d667c2043c 100644 --- a/src/librustc/middle/borrowck/mod.rs +++ b/src/librustc/middle/borrowck/mod.rs @@ -10,7 +10,6 @@ /*! See doc.rs for a thorough explanation of the borrow checker */ -use core::prelude::*; use mc = middle::mem_categorization; use middle::ty; @@ -21,10 +20,10 @@ use middle::dataflow::DataFlowOperator; use util::common::stmt_set; use util::ppaux::{note_and_explain_region, Repr, UserString}; -use core::hashmap::{HashSet, HashMap}; -use core::io; -use core::ops::{BitOr, BitAnd}; -use core::result::{Result}; +use std::hashmap::{HashSet, HashMap}; +use std::io; +use std::ops::{BitOr, BitAnd}; +use std::result::{Result}; use syntax::ast; use syntax::ast_map; use syntax::visit; diff --git a/src/librustc/middle/borrowck/move_data.rs b/src/librustc/middle/borrowck/move_data.rs index 623dbbd61b2..97fd6ca5cc4 100644 --- a/src/librustc/middle/borrowck/move_data.rs +++ b/src/librustc/middle/borrowck/move_data.rs @@ -15,10 +15,9 @@ comments in the section "Moves and initialization" and in `doc.rs`. */ -use core::prelude::*; -use core::hashmap::{HashMap, HashSet}; -use core::uint; +use std::hashmap::{HashMap, HashSet}; +use std::uint; use middle::borrowck::*; use middle::dataflow::DataFlowContext; use middle::dataflow::DataFlowOperator; diff --git a/src/librustc/middle/check_const.rs b/src/librustc/middle/check_const.rs index 2c6ba79e96e..66689944e7c 100644 --- a/src/librustc/middle/check_const.rs +++ b/src/librustc/middle/check_const.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use driver::session::Session; use middle::resolve; diff --git a/src/librustc/middle/check_match.rs b/src/librustc/middle/check_match.rs index e2ab3247c19..ec5f5205760 100644 --- a/src/librustc/middle/check_match.rs +++ b/src/librustc/middle/check_match.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use middle::const_eval::{compare_const_vals, lookup_const_by_id}; use middle::const_eval::{eval_const_expr, const_val, const_bool}; @@ -19,8 +18,8 @@ use middle::typeck::method_map; use middle::moves; use util::ppaux::ty_to_str; -use core::uint; -use core::vec; +use std::uint; +use std::vec; use extra::sort; use syntax::ast::*; use syntax::ast_util::{unguarded_pat, walk_pat}; diff --git a/src/librustc/middle/const_eval.rs b/src/librustc/middle/const_eval.rs index df7de540ea9..9d94a2de693 100644 --- a/src/librustc/middle/const_eval.rs +++ b/src/librustc/middle/const_eval.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use metadata::csearch; use middle::astencode; @@ -18,9 +17,9 @@ use middle; use syntax::{ast, ast_map, ast_util, visit}; use syntax::ast::*; -use core::float; -use core::hashmap::{HashMap, HashSet}; -use core::vec; +use std::float; +use std::hashmap::{HashMap, HashSet}; +use std::vec; // // This pass classifies expressions by their constant-ness. diff --git a/src/librustc/middle/dataflow.rs b/src/librustc/middle/dataflow.rs index 93202f3fd55..ac18a9b76cf 100644 --- a/src/librustc/middle/dataflow.rs +++ b/src/librustc/middle/dataflow.rs @@ -16,13 +16,12 @@ * GEN and KILL bits for each expression. */ -use core::prelude::*; -use core::cast; -use core::io; -use core::uint; -use core::vec; -use core::hashmap::HashMap; +use std::cast; +use std::io; +use std::uint; +use std::vec; +use std::hashmap::HashMap; use syntax::ast; use syntax::ast_util; use syntax::ast_util::id_range; diff --git a/src/librustc/middle/entry.rs b/src/librustc/middle/entry.rs index 904a7ec8c87..9bcfab0773f 100644 --- a/src/librustc/middle/entry.rs +++ b/src/librustc/middle/entry.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use driver::session; use driver::session::Session; @@ -18,7 +17,7 @@ use syntax::codemap::span; use syntax::visit::{default_visitor, mk_vt, vt, Visitor, visit_crate, visit_item}; use syntax::attr::{attrs_contains_name}; use syntax::ast_map; -use core::util; +use std::util; struct EntryContext { session: Session, diff --git a/src/librustc/middle/freevars.rs b/src/librustc/middle/freevars.rs index c2f663ae23c..ee7c35fb3d5 100644 --- a/src/librustc/middle/freevars.rs +++ b/src/librustc/middle/freevars.rs @@ -11,12 +11,11 @@ // A pass that annotates for each loops and functions with the free // variables that they contain. -use core::prelude::*; use middle::resolve; use middle::ty; -use core::hashmap::HashMap; +use std::hashmap::HashMap; use syntax::codemap::span; use syntax::{ast, ast_util, visit}; diff --git a/src/librustc/middle/kind.rs b/src/librustc/middle/kind.rs index d4b91ed589d..a207985e64c 100644 --- a/src/librustc/middle/kind.rs +++ b/src/librustc/middle/kind.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use middle::freevars::freevar_entry; use middle::freevars; diff --git a/src/librustc/middle/lang_items.rs b/src/librustc/middle/lang_items.rs index 08e55df5b36..1549a6e998c 100644 --- a/src/librustc/middle/lang_items.rs +++ b/src/librustc/middle/lang_items.rs @@ -19,7 +19,6 @@ // // * Functions called by the compiler itself. -use core::prelude::*; use driver::session::Session; use metadata::csearch::each_lang_item; @@ -30,7 +29,7 @@ use syntax::ast_util::local_def; use syntax::visit::{default_simple_visitor, mk_simple_visitor, SimpleVisitor}; use syntax::visit::visit_crate; -use core::hashmap::HashMap; +use std::hashmap::HashMap; pub enum LangItem { FreezeTraitLangItem, // 0 diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs index ccbd006edec..d0fd516778b 100644 --- a/src/librustc/middle/lint.rs +++ b/src/librustc/middle/lint.rs @@ -8,25 +8,24 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use driver::session; use middle::ty; use middle::pat_util; use util::ppaux::{ty_to_str}; -use core::char; -use core::cmp; -use core::hashmap::HashMap; -use core::i16; -use core::i32; -use core::i64; -use core::i8; -use core::u16; -use core::u32; -use core::u64; -use core::u8; -use core::vec; +use std::char; +use std::cmp; +use std::hashmap::HashMap; +use std::i16; +use std::i32; +use std::i64; +use std::i8; +use std::u16; +use std::u32; +use std::u64; +use std::u8; +use std::vec; use extra::smallintmap::SmallIntMap; use syntax::attr; use syntax::codemap::span; @@ -139,7 +138,7 @@ static lint_table: &'static [(&'static str, LintSpec)] = &[ ("ctypes", LintSpec { lint: ctypes, - desc: "proper use of core::libc types in foreign modules", + desc: "proper use of std::libc types in foreign modules", default: warn }), diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs index 86b8b294319..1e5e5453ee2 100644 --- a/src/librustc/middle/liveness.rs +++ b/src/librustc/middle/liveness.rs @@ -102,7 +102,6 @@ * to return explicitly. */ -use core::prelude::*; use middle::lint::{unused_variable, dead_assignment}; use middle::pat_util; @@ -110,12 +109,12 @@ use middle::ty; use middle::typeck; use middle::moves; -use core::cast::transmute; -use core::hashmap::HashMap; -use core::io; -use core::to_str; -use core::uint; -use core::vec; +use std::cast::transmute; +use std::hashmap::HashMap; +use std::io; +use std::to_str; +use std::uint; +use std::vec; use syntax::ast::*; use syntax::codemap::span; use syntax::parse::token::special_idents; diff --git a/src/librustc/middle/mem_categorization.rs b/src/librustc/middle/mem_categorization.rs index ad5951b3976..fd36858ba68 100644 --- a/src/librustc/middle/mem_categorization.rs +++ b/src/librustc/middle/mem_categorization.rs @@ -46,14 +46,13 @@ * then an index to jump forward to the relevant item. */ -use core::prelude::*; use middle::ty; use middle::typeck; use util::ppaux::{ty_to_str, region_ptr_to_str, Repr}; use util::common::indenter; -use core::uint; +use std::uint; use syntax::ast::{m_imm, m_const, m_mutbl}; use syntax::ast; use syntax::codemap::span; diff --git a/src/librustc/middle/moves.rs b/src/librustc/middle/moves.rs index cd9d8738026..c7d338b1976 100644 --- a/src/librustc/middle/moves.rs +++ b/src/librustc/middle/moves.rs @@ -126,7 +126,6 @@ and so on. */ -use core::prelude::*; use middle::pat_util::{pat_bindings}; use middle::freevars; @@ -136,8 +135,8 @@ use util::ppaux; use util::ppaux::Repr; use util::common::indenter; -use core::at_vec; -use core::hashmap::{HashSet, HashMap}; +use std::at_vec; +use std::hashmap::{HashSet, HashMap}; use syntax::ast::*; use syntax::ast_util; use syntax::visit; diff --git a/src/librustc/middle/pat_util.rs b/src/librustc/middle/pat_util.rs index 654d77b2a79..f6da8f392cc 100644 --- a/src/librustc/middle/pat_util.rs +++ b/src/librustc/middle/pat_util.rs @@ -8,11 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use middle::resolve; -use core::hashmap::HashMap; +use std::hashmap::HashMap; use syntax::ast::*; use syntax::ast_util::{path_to_ident, walk_pat}; use syntax::codemap::span; diff --git a/src/librustc/middle/privacy.rs b/src/librustc/middle/privacy.rs index c3241dca1b8..5e544dc06e3 100644 --- a/src/librustc/middle/privacy.rs +++ b/src/librustc/middle/privacy.rs @@ -11,7 +11,6 @@ // A pass that checks to make sure private fields and methods aren't used // outside their scopes. -use core::prelude::*; use metadata::csearch; use middle::ty::{ty_struct, ty_enum}; @@ -20,7 +19,7 @@ use middle::typeck::{method_map, method_origin, method_param, method_self}; use middle::typeck::{method_super}; use middle::typeck::{method_static, method_trait}; -use core::util::ignore; +use std::util::ignore; use syntax::ast::{decl_item, def, def_fn, def_id, def_static_method}; use syntax::ast::{def_variant, expr_field, expr_method_call, expr_path}; use syntax::ast::{expr_struct, expr_unary, ident, inherited, item_enum}; diff --git a/src/librustc/middle/reachable.rs b/src/librustc/middle/reachable.rs index 88bd9c1f6f4..53d0e8d3576 100644 --- a/src/librustc/middle/reachable.rs +++ b/src/librustc/middle/reachable.rs @@ -15,14 +15,13 @@ // makes all other generics or inline functions that it references // reachable as well. -use core::prelude::*; -use core::iterator::IteratorUtil; +use std::iterator::IteratorUtil; use middle::resolve; use middle::ty; use middle::typeck; -use core::hashmap::HashSet; +use std::hashmap::HashSet; use syntax::ast::*; use syntax::ast; use syntax::ast_map; diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs index 00a44904fed..e4e554b65bf 100644 --- a/src/librustc/middle/region.rs +++ b/src/librustc/middle/region.rs @@ -17,7 +17,6 @@ region parameterized. */ -use core::prelude::*; use driver::session::Session; use metadata::csearch; @@ -26,7 +25,7 @@ use middle::ty::{region_variance, rv_covariant, rv_invariant}; use middle::ty::{rv_contravariant, FreeRegion}; use middle::ty; -use core::hashmap::{HashMap, HashSet}; +use std::hashmap::{HashMap, HashSet}; use syntax::ast_map; use syntax::codemap::span; use syntax::print::pprust; diff --git a/src/librustc/middle/resolve.rs b/src/librustc/middle/resolve.rs index b2bfd9d1661..733ff9c1413 100644 --- a/src/librustc/middle/resolve.rs +++ b/src/librustc/middle/resolve.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use driver::session::Session; use metadata::csearch::{each_path, get_trait_method_def_ids}; @@ -40,11 +39,11 @@ use syntax::visit::{visit_foreign_item, visit_item}; use syntax::visit::{visit_mod, visit_ty, vt}; use syntax::opt_vec::OptVec; -use core::str; -use core::uint; -use core::vec; -use core::hashmap::{HashMap, HashSet}; -use core::util; +use std::str; +use std::uint; +use std::vec; +use std::hashmap::{HashMap, HashSet}; +use std::util; // Definition mapping pub type DefMap = @mut HashMap; diff --git a/src/librustc/middle/subst.rs b/src/librustc/middle/subst.rs index fba174c6840..e5f5315a19c 100644 --- a/src/librustc/middle/subst.rs +++ b/src/librustc/middle/subst.rs @@ -10,7 +10,6 @@ // Type substitutions. -use core::prelude::*; use middle::ty; use util::ppaux::Repr; diff --git a/src/librustc/middle/trans/_match.rs b/src/librustc/middle/trans/_match.rs index c2e9c7b194b..1d69b20f5c4 100644 --- a/src/librustc/middle/trans/_match.rs +++ b/src/librustc/middle/trans/_match.rs @@ -147,7 +147,6 @@ * */ -use core::prelude::*; use back::abi; use lib::llvm::{llvm, ValueRef, BasicBlockRef}; @@ -172,8 +171,8 @@ use middle::trans::type_of; use middle::ty; use util::common::indenter; -use core::hashmap::HashMap; -use core::vec; +use std::hashmap::HashMap; +use std::vec; use syntax::ast; use syntax::ast::ident; use syntax::ast_util::path_to_ident; @@ -304,7 +303,7 @@ pub fn variant_opt(bcx: block, pat_id: ast::node_id) adt::represent_node(bcx, pat_id)) } } - ::core::util::unreachable(); + ::std::util::unreachable(); } ast::def_fn(*) | ast::def_struct(_) => { diff --git a/src/librustc/middle/trans/adt.rs b/src/librustc/middle/trans/adt.rs index 9b7c7037f42..5417d6f6cc6 100644 --- a/src/librustc/middle/trans/adt.rs +++ b/src/librustc/middle/trans/adt.rs @@ -44,10 +44,10 @@ * taken to it, implementing them for Rust seems difficult. */ -use core::container::Map; -use core::libc::c_ulonglong; -use core::option::{Option, Some, None}; -use core::vec; +use std::container::Map; +use std::libc::c_ulonglong; +use std::option::{Option, Some, None}; +use std::vec; use lib::llvm::{ValueRef, True, IntEQ, IntNE}; use middle::trans::_match; @@ -86,7 +86,7 @@ pub enum Repr { * it represents the other case, which is inhabited by at most one value * (and all other fields are undefined/unused). * - * For example, `core::option::Option` instantiated at a safe pointer type + * For example, `std::option::Option` instantiated at a safe pointer type * is represented such that `None` is a null pointer and `Some` is the * identity function. */ diff --git a/src/librustc/middle/trans/asm.rs b/src/librustc/middle/trans/asm.rs index a1d1b737f31..99d4dbd2544 100644 --- a/src/librustc/middle/trans/asm.rs +++ b/src/librustc/middle/trans/asm.rs @@ -12,7 +12,6 @@ # Translation of inline assembly. */ -use core::prelude::*; use lib; use middle::trans::build::*; @@ -22,7 +21,7 @@ use middle::ty; use middle::trans::type_::Type; -use core::str; +use std::str; use syntax::ast; // Take an inline assembly expression and splat it out via LLVM diff --git a/src/librustc/middle/trans/base.rs b/src/librustc/middle/trans/base.rs index d9fea121346..b9c7b8ad0ab 100644 --- a/src/librustc/middle/trans/base.rs +++ b/src/librustc/middle/trans/base.rs @@ -23,7 +23,6 @@ // but many TypeRefs correspond to one ty::t; for instance, tup(int, int, // int) and rec(x=int, y=int, z=int) will have the same TypeRef. -use core::prelude::*; use back::link::{mangle_exported_name}; use back::{link, abi}; @@ -63,15 +62,15 @@ use util::ppaux::{Repr, ty_to_str}; use middle::trans::type_::Type; -use core::hash; -use core::hashmap::{HashMap, HashSet}; -use core::int; -use core::io; -use core::libc::c_uint; -use core::str; -use core::uint; -use core::vec; -use core::local_data; +use std::hash; +use std::hashmap::{HashMap, HashSet}; +use std::int; +use std::io; +use std::libc::c_uint; +use std::str; +use std::uint; +use std::vec; +use std::local_data; use extra::time; use syntax::ast::ident; use syntax::ast_map::{path, path_elt_to_str, path_name}; @@ -800,10 +799,10 @@ pub fn invoke(bcx: block, llfn: ValueRef, llargs: ~[ValueRef]) if need_invoke(bcx) { unsafe { debug!("invoking %x at %x", - ::core::cast::transmute(llfn), - ::core::cast::transmute(bcx.llbb)); + ::std::cast::transmute(llfn), + ::std::cast::transmute(bcx.llbb)); for llargs.iter().advance |&llarg| { - debug!("arg: %x", ::core::cast::transmute(llarg)); + debug!("arg: %x", ::std::cast::transmute(llarg)); } } let normal_bcx = sub_block(bcx, "normal return"); @@ -816,10 +815,10 @@ pub fn invoke(bcx: block, llfn: ValueRef, llargs: ~[ValueRef]) } else { unsafe { debug!("calling %x at %x", - ::core::cast::transmute(llfn), - ::core::cast::transmute(bcx.llbb)); + ::std::cast::transmute(llfn), + ::std::cast::transmute(bcx.llbb)); for llargs.iter().advance |&llarg| { - debug!("arg: %x", ::core::cast::transmute(llarg)); + debug!("arg: %x", ::std::cast::transmute(llarg)); } } let llresult = Call(bcx, llfn, llargs); diff --git a/src/librustc/middle/trans/build.rs b/src/librustc/middle/trans/build.rs index dc32a3b4e2c..46a8cb306f8 100644 --- a/src/librustc/middle/trans/build.rs +++ b/src/librustc/middle/trans/build.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use lib::llvm::llvm; use lib::llvm::{CallConv, AtomicBinOp, AtomicOrdering, AsmDialect}; @@ -22,11 +21,11 @@ use syntax::codemap::span; use middle::trans::base; use middle::trans::type_::Type; -use core::cast; -use core::libc::{c_uint, c_ulonglong, c_char}; -use core::hashmap::HashMap; -use core::str; -use core::vec; +use std::cast; +use std::libc::{c_uint, c_ulonglong, c_char}; +use std::hashmap::HashMap; +use std::str; +use std::vec; pub fn terminate(cx: block, _: &str) { cx.terminated = true; diff --git a/src/librustc/middle/trans/cabi.rs b/src/librustc/middle/trans/cabi.rs index 4526af2da0f..4cbc9cd417f 100644 --- a/src/librustc/middle/trans/cabi.rs +++ b/src/librustc/middle/trans/cabi.rs @@ -15,9 +15,9 @@ use middle::trans::common::*; use middle::trans::type_::Type; -use core::libc::c_uint; -use core::option; -use core::vec; +use std::libc::c_uint; +use std::option; +use std::vec; pub trait ABIInfo { fn compute_info(&self, atys: &[Type], rty: Type, ret_def: bool) -> FnType; diff --git a/src/librustc/middle/trans/cabi_arm.rs b/src/librustc/middle/trans/cabi_arm.rs index 45fdda1990c..7eac2df10b6 100644 --- a/src/librustc/middle/trans/cabi_arm.rs +++ b/src/librustc/middle/trans/cabi_arm.rs @@ -14,8 +14,8 @@ use middle::trans::cabi::{ABIInfo, FnType, LLVMType}; use middle::trans::type_::Type; -use core::option::{Option, None, Some}; -use core::uint; +use std::option::{Option, None, Some}; +use std::uint; fn align_up_to(off: uint, a: uint) -> uint { return (off + a - 1u) / a * a; diff --git a/src/librustc/middle/trans/cabi_mips.rs b/src/librustc/middle/trans/cabi_mips.rs index 47f2fb8634c..c95ae994ceb 100644 --- a/src/librustc/middle/trans/cabi_mips.rs +++ b/src/librustc/middle/trans/cabi_mips.rs @@ -8,11 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; -use core::libc::c_uint; -use core::uint; -use core::vec; +use std::libc::c_uint; +use std::uint; +use std::vec; use lib::llvm::{llvm, Integer, Pointer, Float, Double, Struct, Array}; use lib::llvm::{Attribute, StructRetAttribute}; use middle::trans::context::task_llcx; diff --git a/src/librustc/middle/trans/cabi_x86.rs b/src/librustc/middle/trans/cabi_x86.rs index 8131fd009ee..8c5a2e70484 100644 --- a/src/librustc/middle/trans/cabi_x86.rs +++ b/src/librustc/middle/trans/cabi_x86.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use driver::session::{os_win32, os_macos}; use lib::llvm::*; diff --git a/src/librustc/middle/trans/cabi_x86_64.rs b/src/librustc/middle/trans/cabi_x86_64.rs index 6c264e637a6..f1da63e1f17 100644 --- a/src/librustc/middle/trans/cabi_x86_64.rs +++ b/src/librustc/middle/trans/cabi_x86_64.rs @@ -18,10 +18,10 @@ use middle::trans::cabi::*; use middle::trans::type_::Type; -use core::option; -use core::option::Option; -use core::uint; -use core::vec; +use std::option; +use std::option::Option; +use std::uint; +use std::vec; #[deriving(Eq)] enum RegClass { diff --git a/src/librustc/middle/trans/callee.rs b/src/librustc/middle/trans/callee.rs index 4c07f88f16e..8f9451510af 100644 --- a/src/librustc/middle/trans/callee.rs +++ b/src/librustc/middle/trans/callee.rs @@ -16,9 +16,6 @@ // and methods are represented as just a fn ptr and not a full // closure. -use core::prelude::*; -use core::vec; - use back::abi; use driver::session; use lib; diff --git a/src/librustc/middle/trans/closure.rs b/src/librustc/middle/trans/closure.rs index ad68ffb402e..09b515f1918 100644 --- a/src/librustc/middle/trans/closure.rs +++ b/src/librustc/middle/trans/closure.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use back::abi; use back::link::{mangle_internal_name_by_path_and_seq}; @@ -28,8 +27,8 @@ use util::ppaux::ty_to_str; use middle::trans::type_::Type; -use core::str; -use core::vec; +use std::str; +use std::vec; use syntax::ast; use syntax::ast_map::path_name; use syntax::ast_util; diff --git a/src/librustc/middle/trans/common.rs b/src/librustc/middle/trans/common.rs index b255f2ca78c..fee44af5cc7 100644 --- a/src/librustc/middle/trans/common.rs +++ b/src/librustc/middle/trans/common.rs @@ -10,7 +10,6 @@ //! Code that is useful in various trans modules. -use core::prelude::*; use driver::session; use driver::session::Session; @@ -31,14 +30,14 @@ use util::ppaux::{Repr}; use middle::trans::type_::Type; -use core::cast::transmute; -use core::cast; -use core::hashmap::{HashMap}; -use core::libc::{c_uint, c_longlong, c_ulonglong}; -use core::to_bytes; -use core::str; -use core::vec::raw::to_ptr; -use core::vec; +use std::cast::transmute; +use std::cast; +use std::hashmap::{HashMap}; +use std::libc::{c_uint, c_longlong, c_ulonglong}; +use std::to_bytes; +use std::str; +use std::vec::raw::to_ptr; +use std::vec; use syntax::ast::ident; use syntax::ast_map::{path, path_elt}; use syntax::codemap::span; diff --git a/src/librustc/middle/trans/consts.rs b/src/librustc/middle/trans/consts.rs index d7b6e9cf5a3..97572efedfd 100644 --- a/src/librustc/middle/trans/consts.rs +++ b/src/librustc/middle/trans/consts.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use back::abi; use lib::llvm::{llvm, ConstFCmp, ConstICmp, SetLinkage, PrivateLinkage, ValueRef, Bool, True}; @@ -31,8 +30,8 @@ use util::ppaux::{Repr, ty_to_str}; use middle::trans::type_::Type; -use core::libc::c_uint; -use core::str; +use std::libc::c_uint; +use std::str; use syntax::{ast, ast_util, ast_map}; pub fn const_lit(cx: &mut CrateContext, e: &ast::expr, lit: ast::lit) diff --git a/src/librustc/middle/trans/context.rs b/src/librustc/middle/trans/context.rs index 9b81fc406b7..c2a32ae041e 100644 --- a/src/librustc/middle/trans/context.rs +++ b/src/librustc/middle/trans/context.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use back::{upcall}; use driver::session; @@ -26,10 +25,10 @@ use middle::ty; use middle::trans::type_::Type; -use core::hash; -use core::hashmap::{HashMap, HashSet}; -use core::str; -use core::local_data; +use std::hash; +use std::hashmap::{HashMap, HashSet}; +use std::str; +use std::local_data; use extra::time; use syntax::ast; diff --git a/src/librustc/middle/trans/controlflow.rs b/src/librustc/middle/trans/controlflow.rs index 862f455aeb6..dc88ecbe936 100644 --- a/src/librustc/middle/trans/controlflow.rs +++ b/src/librustc/middle/trans/controlflow.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use back::link; use lib; @@ -26,8 +25,8 @@ use util::ppaux; use middle::trans::type_::Type; -use core::str; -use core::vec; +use std::str; +use std::vec; use syntax::ast; use syntax::ast::ident; use syntax::ast_map::path_mod; diff --git a/src/librustc/middle/trans/datum.rs b/src/librustc/middle/trans/datum.rs index de56d9a05f1..0fe3dfe80c8 100644 --- a/src/librustc/middle/trans/datum.rs +++ b/src/librustc/middle/trans/datum.rs @@ -87,7 +87,6 @@ * methods themselves. Most are only suitable for some types of * values. */ -use core::prelude::*; use lib; use lib::llvm::ValueRef; @@ -105,7 +104,7 @@ use middle::ty; use util::common::indenter; use util::ppaux::ty_to_str; -use core::uint; +use std::uint; use syntax::ast; use syntax::codemap::span; use syntax::parse::token::special_idents; diff --git a/src/librustc/middle/trans/debuginfo.rs b/src/librustc/middle/trans/debuginfo.rs index 22448f577a3..ac5eb6b067c 100644 --- a/src/librustc/middle/trans/debuginfo.rs +++ b/src/librustc/middle/trans/debuginfo.rs @@ -41,7 +41,6 @@ This file consists of three conceptual sections: */ -use core::prelude::*; use driver::session; use lib::llvm::llvm; @@ -54,14 +53,14 @@ use middle::trans; use middle::ty; use util::ppaux::ty_to_str; -use core::hashmap::HashMap; -use core::libc; -use core::libc::{c_uint, c_ulonglong}; -use core::cmp; -use core::ptr; -use core::str::as_c_str; -use core::sys; -use core::vec; +use std::hashmap::HashMap; +use std::libc; +use std::libc::{c_uint, c_ulonglong}; +use std::cmp; +use std::ptr; +use std::str::as_c_str; +use std::sys; +use std::vec; use syntax::codemap::span; use syntax::{ast, codemap, ast_util, ast_map}; use syntax::parse::token; diff --git a/src/librustc/middle/trans/expr.rs b/src/librustc/middle/trans/expr.rs index 35322730756..5a7e21d1fcc 100644 --- a/src/librustc/middle/trans/expr.rs +++ b/src/librustc/middle/trans/expr.rs @@ -119,7 +119,6 @@ lvalues are *never* stored by value. */ -use core::prelude::*; use back::abi; use lib::llvm::{ValueRef, llvm}; @@ -154,9 +153,9 @@ use util::ppaux::Repr; use middle::trans::type_::Type; -use core::cast::transmute; -use core::hashmap::HashMap; -use core::vec; +use std::cast::transmute; +use std::hashmap::HashMap; +use std::vec; use syntax::print::pprust::{expr_to_str}; use syntax::ast; use syntax::codemap; diff --git a/src/librustc/middle/trans/foreign.rs b/src/librustc/middle/trans/foreign.rs index 7672f3b615d..bea702f938d 100644 --- a/src/librustc/middle/trans/foreign.rs +++ b/src/librustc/middle/trans/foreign.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use back::{link, abi}; use lib::llvm::{ValueRef}; @@ -33,8 +32,8 @@ use middle::ty; use middle::ty::FnSig; use util::ppaux::ty_to_str; -use core::uint; -use core::vec; +use std::uint; +use std::vec; use syntax::codemap::span; use syntax::{ast, ast_util}; use syntax::{attr, ast_map}; diff --git a/src/librustc/middle/trans/glue.rs b/src/librustc/middle/trans/glue.rs index 0172b705465..7282e48f13d 100644 --- a/src/librustc/middle/trans/glue.rs +++ b/src/librustc/middle/trans/glue.rs @@ -12,7 +12,6 @@ // // Code relating to taking, dropping, etc as well as type descriptors. -use core::prelude::*; use back::abi; use back::link::*; @@ -37,9 +36,9 @@ use util::ppaux::ty_to_short_str; use middle::trans::type_::Type; -use core::io; -use core::libc::c_uint; -use core::str; +use std::io; +use std::libc::c_uint; +use std::str; use extra::time; use syntax::ast; diff --git a/src/librustc/middle/trans/inline.rs b/src/librustc/middle/trans/inline.rs index 11c02f165b6..692987eedeb 100644 --- a/src/librustc/middle/trans/inline.rs +++ b/src/librustc/middle/trans/inline.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use metadata::csearch; use middle::astencode; @@ -18,7 +17,7 @@ use middle::trans::common::*; use middle::ty; use util::ppaux::ty_to_str; -use core::vec; +use std::vec; use syntax::ast; use syntax::ast_map::path_name; use syntax::ast_util::local_def; diff --git a/src/librustc/middle/trans/meth.rs b/src/librustc/middle/trans/meth.rs index 0b051662781..02488084ea8 100644 --- a/src/librustc/middle/trans/meth.rs +++ b/src/librustc/middle/trans/meth.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use back::abi; use lib::llvm::llvm; @@ -32,7 +31,7 @@ use util::ppaux::Repr; use middle::trans::type_::Type; -use core::vec; +use std::vec; use syntax::ast_map::{path, path_mod, path_name}; use syntax::ast_util; use syntax::{ast, ast_map}; diff --git a/src/librustc/middle/trans/monomorphize.rs b/src/librustc/middle/trans/monomorphize.rs index 92d8192aee6..4ae8554d714 100644 --- a/src/librustc/middle/trans/monomorphize.rs +++ b/src/librustc/middle/trans/monomorphize.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use back::link::mangle_exported_name; use driver::session; @@ -31,7 +30,7 @@ use middle::ty::{FnSig}; use middle::typeck; use util::ppaux::{Repr,ty_to_str}; -use core::vec; +use std::vec; use syntax::ast; use syntax::ast_map; use syntax::ast_map::path_name; diff --git a/src/librustc/middle/trans/reflect.rs b/src/librustc/middle/trans/reflect.rs index 16695ad59a0..9e227da49f8 100644 --- a/src/librustc/middle/trans/reflect.rs +++ b/src/librustc/middle/trans/reflect.rs @@ -25,9 +25,9 @@ use middle::trans::type_of::*; use middle::ty; use util::ppaux::ty_to_str; -use core::libc::c_uint; -use core::option::None; -use core::vec; +use std::libc::c_uint; +use std::option::None; +use std::vec; use syntax::ast::def_id; use syntax::ast; use syntax::ast_map::path_name; diff --git a/src/librustc/middle/trans/tvec.rs b/src/librustc/middle/trans/tvec.rs index 1344bed96ee..4a9869ca007 100644 --- a/src/librustc/middle/trans/tvec.rs +++ b/src/librustc/middle/trans/tvec.rs @@ -29,7 +29,7 @@ use util::ppaux::ty_to_str; use middle::trans::type_::Type; -use core::option::None; +use std::option::None; use syntax::ast; use syntax::codemap; diff --git a/src/librustc/middle/trans/type_.rs b/src/librustc/middle/trans/type_.rs index 64688ac4134..e52d33fc6e9 100644 --- a/src/librustc/middle/trans/type_.rs +++ b/src/librustc/middle/trans/type_.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use lib::llvm::{llvm, TypeRef, Bool, False, True, TypeKind}; use lib::llvm::{Float, Double, X86_FP80, PPC_FP128, FP128}; @@ -21,10 +20,10 @@ use middle::trans::base; use syntax::ast; use syntax::abi::{Architecture, X86, X86_64, Arm, Mips}; -use core::vec; -use core::cast; +use std::vec; +use std::cast; -use core::libc::{c_uint}; +use std::libc::{c_uint}; #[deriving(Eq)] pub struct Type { diff --git a/src/librustc/middle/trans/type_of.rs b/src/librustc/middle/trans/type_of.rs index 3699314a1d2..481f08ee192 100644 --- a/src/librustc/middle/trans/type_of.rs +++ b/src/librustc/middle/trans/type_of.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use middle::trans::adt; use middle::trans::common::*; diff --git a/src/librustc/middle/trans/type_use.rs b/src/librustc/middle/trans/type_use.rs index c636b7f4876..7ae1ba11142 100644 --- a/src/librustc/middle/trans/type_use.rs +++ b/src/librustc/middle/trans/type_use.rs @@ -33,9 +33,9 @@ use middle::trans::inline; use middle::ty; use middle::typeck; -use core::option::{Some, None}; -use core::uint; -use core::vec; +use std::option::{Some, None}; +use std::uint; +use std::vec; use extra::list::{List, Cons, Nil}; use extra::list; use syntax::ast; diff --git a/src/librustc/middle/trans/write_guard.rs b/src/librustc/middle/trans/write_guard.rs index eb5376da696..068ce4e2b33 100644 --- a/src/librustc/middle/trans/write_guard.rs +++ b/src/librustc/middle/trans/write_guard.rs @@ -14,7 +14,6 @@ //! and for each in debugging (e.g., so you can use //! `RUST_LOG=rustc::middle::trans::write_guard`). -use core::prelude::*; use lib::llvm::ValueRef; use middle::borrowck::{RootInfo, root_map_key, DynaImm, DynaMut}; diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index b8ee1eee26e..c34046179c4 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use driver::session; use metadata::csearch; @@ -27,16 +26,16 @@ use util::ppaux::{Repr, UserString}; use util::common::{indenter}; use util::enum_set::{EnumSet, CLike}; -use core::cast; -use core::cmp; -use core::hashmap::{HashMap, HashSet}; -use core::iter; -use core::ops; -use core::ptr::to_unsafe_ptr; -use core::to_bytes; -use core::u32; -use core::uint; -use core::vec; +use std::cast; +use std::cmp; +use std::hashmap::{HashMap, HashSet}; +use std::iter; +use std::ops; +use std::ptr::to_unsafe_ptr; +use std::to_bytes; +use std::u32; +use std::uint; +use std::vec; use syntax::ast::*; use syntax::ast_util::is_local; use syntax::ast_util; diff --git a/src/librustc/middle/typeck/astconv.rs b/src/librustc/middle/typeck/astconv.rs index 07fb23fea48..7c1ff259acc 100644 --- a/src/librustc/middle/typeck/astconv.rs +++ b/src/librustc/middle/typeck/astconv.rs @@ -52,7 +52,6 @@ * an rptr (`&r.T`) use the region `r` that appears in the rptr. */ -use core::prelude::*; use middle::const_eval; use middle::ty::{substs}; @@ -63,8 +62,8 @@ use middle::typeck::rscope::{region_scope, RegionError}; use middle::typeck::rscope::RegionParamNames; use middle::typeck::lookup_def_tcx; -use core::result; -use core::vec; +use std::result; +use std::vec; use syntax::abi::AbiSet; use syntax::{ast, ast_util}; use syntax::codemap::span; diff --git a/src/librustc/middle/typeck/check/_match.rs b/src/librustc/middle/typeck/check/_match.rs index 58a527f3501..c2bf4594d30 100644 --- a/src/librustc/middle/typeck/check/_match.rs +++ b/src/librustc/middle/typeck/check/_match.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use middle::pat_util::{PatIdMap, pat_id_map, pat_is_binding, pat_is_const}; use middle::ty; @@ -18,7 +17,7 @@ use middle::typeck::check::{instantiate_path, lookup_def}; use middle::typeck::check::{structure_of, valid_range_bounds}; use middle::typeck::require_same_types; -use core::hashmap::{HashMap, HashSet}; +use std::hashmap::{HashMap, HashSet}; use syntax::ast; use syntax::ast_util; use syntax::codemap::span; diff --git a/src/librustc/middle/typeck/check/demand.rs b/src/librustc/middle/typeck/check/demand.rs index 3fa551e4b05..7ca78068f07 100644 --- a/src/librustc/middle/typeck/check/demand.rs +++ b/src/librustc/middle/typeck/check/demand.rs @@ -13,8 +13,8 @@ use middle::ty; use middle::typeck::check::FnCtxt; use middle::typeck::infer; -use core::result::{Err, Ok}; -use core::result; +use std::result::{Err, Ok}; +use std::result; use syntax::ast; use syntax::codemap::span; diff --git a/src/librustc/middle/typeck/check/method.rs b/src/librustc/middle/typeck/check/method.rs index 4bebca3c9a8..bb7bff920aa 100644 --- a/src/librustc/middle/typeck/check/method.rs +++ b/src/librustc/middle/typeck/check/method.rs @@ -79,7 +79,6 @@ obtained the type `Foo`, we would never match this method. */ -use core::prelude::*; use middle::resolve; use middle::ty::*; @@ -95,10 +94,10 @@ use middle::typeck::{method_self, method_static, method_trait, method_super}; use middle::typeck::check::regionmanip::replace_bound_regions_in_fn_sig; use util::common::indenter; -use core::hashmap::HashSet; -use core::result; -use core::uint; -use core::vec; +use std::hashmap::HashSet; +use std::result; +use std::uint; +use std::vec; use extra::list::Nil; use syntax::ast::{def_id, sty_value, sty_region, sty_box}; use syntax::ast::{sty_uniq, sty_static, node_id}; diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs index 23266767124..bfd9e71eea0 100644 --- a/src/librustc/middle/typeck/check/mod.rs +++ b/src/librustc/middle/typeck/check/mod.rs @@ -76,7 +76,6 @@ type parameter). */ -use core::prelude::*; use middle::const_eval; use middle::pat_util::pat_id_map; @@ -111,11 +110,11 @@ use util::ppaux::{bound_region_ptr_to_str}; use util::ppaux; -use core::cast::transmute; -use core::hashmap::HashMap; -use core::result; -use core::util::replace; -use core::vec; +use std::cast::transmute; +use std::hashmap::HashMap; +use std::result; +use std::util::replace; +use std::vec; use extra::list::Nil; use syntax::abi::AbiSet; use syntax::ast::{provided, required}; diff --git a/src/librustc/middle/typeck/check/regionck.rs b/src/librustc/middle/typeck/check/regionck.rs index df81ebd48aa..80faad15695 100644 --- a/src/librustc/middle/typeck/check/regionck.rs +++ b/src/librustc/middle/typeck/check/regionck.rs @@ -27,7 +27,6 @@ this point a bit better. */ -use core::prelude::*; use middle::freevars::get_freevars; use middle::ty::{re_scope}; @@ -39,8 +38,8 @@ use middle::typeck::infer::resolve_type; use util::ppaux::{note_and_explain_region, ty_to_str, region_to_str}; use middle::pat_util; -use core::result; -use core::uint; +use std::result; +use std::uint; use syntax::ast::{ManagedSigil, OwnedSigil, BorrowedSigil}; use syntax::ast::{def_arg, def_binding, def_local, def_self, def_upvar}; use syntax::ast; @@ -788,7 +787,6 @@ pub mod guarantor { * but more special purpose. */ - use core::prelude::*; use middle::typeck::check::regionck::{Rcx, infallibly_mk_subr}; use middle::typeck::check::regionck::mk_subregion_due_to_derefence; @@ -797,7 +795,7 @@ pub mod guarantor { use syntax::codemap::span; use util::ppaux::{ty_to_str}; - use core::uint; + use std::uint; pub fn for_addr_of(rcx: @mut Rcx, expr: @ast::expr, base: @ast::expr) { /*! diff --git a/src/librustc/middle/typeck/check/regionmanip.rs b/src/librustc/middle/typeck/check/regionmanip.rs index fb79a7c3c99..02c003b7525 100644 --- a/src/librustc/middle/typeck/check/regionmanip.rs +++ b/src/librustc/middle/typeck/check/regionmanip.rs @@ -10,7 +10,6 @@ // #[warn(deprecated_mode)]; -use core::prelude::*; use middle::ty; diff --git a/src/librustc/middle/typeck/check/vtable.rs b/src/librustc/middle/typeck/check/vtable.rs index 0bf20f9fbcb..bbd9c1f765b 100644 --- a/src/librustc/middle/typeck/check/vtable.rs +++ b/src/librustc/middle/typeck/check/vtable.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use middle::ty::param_ty; use middle::ty; @@ -24,8 +23,8 @@ use util::common::indenter; use util::ppaux::tys_to_str; use util::ppaux; -use core::hashmap::HashSet; -use core::result; +use std::hashmap::HashSet; +use std::result; use syntax::ast; use syntax::ast_util; use syntax::codemap::span; diff --git a/src/librustc/middle/typeck/check/writeback.rs b/src/librustc/middle/typeck/check/writeback.rs index e2efdc51fca..e5248e01ed7 100644 --- a/src/librustc/middle/typeck/check/writeback.rs +++ b/src/librustc/middle/typeck/check/writeback.rs @@ -12,7 +12,6 @@ // unresolved type variables and replaces "ty_var" types with their // substitutions. -use core::prelude::*; use middle::pat_util; use middle::ty; diff --git a/src/librustc/middle/typeck/coherence.rs b/src/librustc/middle/typeck/coherence.rs index a537d0cc72c..3483245706f 100644 --- a/src/librustc/middle/typeck/coherence.rs +++ b/src/librustc/middle/typeck/coherence.rs @@ -14,7 +14,6 @@ // has at most one implementation for each type. Then we build a mapping from // each trait in the system to its implementations. -use core::prelude::*; use metadata::csearch::{each_path, get_impl_trait}; use metadata::csearch; @@ -52,10 +51,10 @@ use syntax::visit::{Visitor, SimpleVisitor}; use syntax::visit::{visit_mod}; use util::ppaux::ty_to_str; -use core::hashmap::{HashMap, HashSet}; -use core::result::Ok; -use core::uint; -use core::vec; +use std::hashmap::{HashMap, HashSet}; +use std::result::Ok; +use std::uint; +use std::vec; pub struct UniversalQuantificationResult { monotype: t, diff --git a/src/librustc/middle/typeck/collect.rs b/src/librustc/middle/typeck/collect.rs index 5065a475a40..3a4fa82906d 100644 --- a/src/librustc/middle/typeck/collect.rs +++ b/src/librustc/middle/typeck/collect.rs @@ -30,7 +30,6 @@ are represented as `ty_param()` instances. */ -use core::prelude::*; use metadata::csearch; use middle::ty::{substs, ty_param_bounds_and_ty}; @@ -47,8 +46,8 @@ use util::common::pluralize; use util::ppaux; use util::ppaux::UserString; -use core::result; -use core::vec; +use std::result; +use std::vec; use syntax::abi::AbiSet; use syntax::ast::{RegionTyParamBound, TraitTyParamBound}; use syntax::ast; diff --git a/src/librustc/middle/typeck/infer/coercion.rs b/src/librustc/middle/typeck/infer/coercion.rs index 18940bb89e1..63f882f5e54 100644 --- a/src/librustc/middle/typeck/infer/coercion.rs +++ b/src/librustc/middle/typeck/infer/coercion.rs @@ -64,7 +64,6 @@ we may want to adjust precisely when coercions occur. */ -use core::prelude::*; use middle::ty::{AutoPtr, AutoBorrowVec, AutoBorrowFn}; use middle::ty::{AutoDerefRef}; diff --git a/src/librustc/middle/typeck/infer/combine.rs b/src/librustc/middle/typeck/infer/combine.rs index 7a4ea0999ef..f80f022b543 100644 --- a/src/librustc/middle/typeck/infer/combine.rs +++ b/src/librustc/middle/typeck/infer/combine.rs @@ -54,7 +54,6 @@ // terms of error reporting, although we do not do that properly right // now. -use core::prelude::*; use middle::ty::{FloatVar, FnSig, IntVar, TyVar}; use middle::ty::{IntType, UintType, substs}; @@ -68,8 +67,8 @@ use middle::typeck::infer::unify::{InferCtxtMethods, UnifyInferCtxtMethods}; use middle::typeck::infer::{InferCtxt, cres, ures}; use util::common::indent; -use core::result::{iter_vec2, map_vec2}; -use core::vec; +use std::result::{iter_vec2, map_vec2}; +use std::vec; use syntax::ast::{Onceness, purity}; use syntax::ast; use syntax::opt_vec; diff --git a/src/librustc/middle/typeck/infer/glb.rs b/src/librustc/middle/typeck/infer/glb.rs index 47fb28f8484..0dd45919be1 100644 --- a/src/librustc/middle/typeck/infer/glb.rs +++ b/src/librustc/middle/typeck/infer/glb.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use middle::ty::{BuiltinBounds}; use middle::ty::RegionVid; diff --git a/src/librustc/middle/typeck/infer/lattice.rs b/src/librustc/middle/typeck/infer/lattice.rs index ed19310d5d6..73e43c6c076 100644 --- a/src/librustc/middle/typeck/infer/lattice.rs +++ b/src/librustc/middle/typeck/infer/lattice.rs @@ -32,7 +32,6 @@ * a lattice. */ -use core::prelude::*; use middle::ty::{RegionVid, TyVar, Vid}; use middle::ty; diff --git a/src/librustc/middle/typeck/infer/lub.rs b/src/librustc/middle/typeck/infer/lub.rs index c77bef835e4..ad063be8614 100644 --- a/src/librustc/middle/typeck/infer/lub.rs +++ b/src/librustc/middle/typeck/infer/lub.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use middle::ty::{BuiltinBounds}; use middle::ty::RegionVid; diff --git a/src/librustc/middle/typeck/infer/mod.rs b/src/librustc/middle/typeck/infer/mod.rs index 3e2d4a71dfb..28d943b5807 100644 --- a/src/librustc/middle/typeck/infer/mod.rs +++ b/src/librustc/middle/typeck/infer/mod.rs @@ -242,7 +242,6 @@ section on "Type Combining" below for details. */ -use core::prelude::*; pub use middle::ty::IntVarValue; pub use middle::typeck::infer::resolve::resolve_and_force_all_but_regions; @@ -267,8 +266,8 @@ use middle::typeck::isr_alist; use util::common::indent; use util::ppaux::{bound_region_to_str, ty_to_str, trait_ref_to_str}; -use core::result; -use core::vec; +use std::result; +use std::vec; use extra::list::Nil; use extra::smallintmap::SmallIntMap; use syntax::ast::{m_imm, m_mutbl}; diff --git a/src/librustc/middle/typeck/infer/region_inference.rs b/src/librustc/middle/typeck/infer/region_inference.rs index 4380711b78e..bad4cb2fe87 100644 --- a/src/librustc/middle/typeck/infer/region_inference.rs +++ b/src/librustc/middle/typeck/infer/region_inference.rs @@ -536,7 +536,6 @@ more convincing in the future. */ -use core::prelude::*; use middle::ty; use middle::ty::{FreeRegion, Region, RegionVid}; @@ -546,10 +545,10 @@ use middle::typeck::infer::cres; use util::common::indenter; use util::ppaux::note_and_explain_region; -use core::cell::Cell; -use core::hashmap::{HashMap, HashSet}; -use core::uint; -use core::vec; +use std::cell::Cell; +use std::hashmap::{HashMap, HashSet}; +use std::uint; +use std::vec; use syntax::codemap::span; use syntax::ast; diff --git a/src/librustc/middle/typeck/infer/resolve.rs b/src/librustc/middle/typeck/infer/resolve.rs index 1311907eed2..2326e2e10ef 100644 --- a/src/librustc/middle/typeck/infer/resolve.rs +++ b/src/librustc/middle/typeck/infer/resolve.rs @@ -46,7 +46,6 @@ // future). If you want to resolve everything but one type, you are // probably better off writing `resolve_all - resolve_ivar`. -use core::prelude::*; use middle::ty::{FloatVar, FloatVid, IntVar, IntVid, RegionVid, TyVar, TyVid}; use middle::ty::{type_is_bot, IntType, UintType}; @@ -58,7 +57,7 @@ use middle::typeck::infer::unify::{Root, UnifyInferCtxtMethods}; use util::common::{indent, indenter}; use util::ppaux::ty_to_str; -use core::vec; +use std::vec; use syntax::ast; pub static resolve_nested_tvar: uint = 0b0000000001; diff --git a/src/librustc/middle/typeck/infer/sub.rs b/src/librustc/middle/typeck/infer/sub.rs index eb912aa2dda..905e86a73f0 100644 --- a/src/librustc/middle/typeck/infer/sub.rs +++ b/src/librustc/middle/typeck/infer/sub.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use middle::ty::{BuiltinBounds}; use middle::ty; diff --git a/src/librustc/middle/typeck/infer/to_str.rs b/src/librustc/middle/typeck/infer/to_str.rs index 364d8b2d052..18594f35295 100644 --- a/src/librustc/middle/typeck/infer/to_str.rs +++ b/src/librustc/middle/typeck/infer/to_str.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use middle::ty::{FnSig, Vid}; use middle::ty::IntVarValue; @@ -18,7 +17,7 @@ use middle::typeck::infer::InferCtxt; use middle::typeck::infer::unify::{Redirect, Root, VarValue}; use util::ppaux::{mt_to_str, ty_to_str, trait_ref_to_str}; -use core::uint; +use std::uint; use syntax::ast; pub trait InferStr { diff --git a/src/librustc/middle/typeck/infer/unify.rs b/src/librustc/middle/typeck/infer/unify.rs index a185633a7ac..a7c3350d1d1 100644 --- a/src/librustc/middle/typeck/infer/unify.rs +++ b/src/librustc/middle/typeck/infer/unify.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use extra::smallintmap::SmallIntMap; diff --git a/src/librustc/middle/typeck/mod.rs b/src/librustc/middle/typeck/mod.rs index 98f7af4bfd4..4eaa0b69d9c 100644 --- a/src/librustc/middle/typeck/mod.rs +++ b/src/librustc/middle/typeck/mod.rs @@ -48,7 +48,6 @@ independently: */ -use core::prelude::*; use driver::session; @@ -58,8 +57,8 @@ use util::common::time; use util::ppaux::Repr; use util::ppaux; -use core::hashmap::HashMap; -use core::result; +use std::hashmap::HashMap; +use std::result; use extra::list::List; use extra::list; use syntax::codemap::span; diff --git a/src/librustc/middle/typeck/rscope.rs b/src/librustc/middle/typeck/rscope.rs index dc9fc264f85..91c875559fe 100644 --- a/src/librustc/middle/typeck/rscope.rs +++ b/src/librustc/middle/typeck/rscope.rs @@ -8,11 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use middle::ty; -use core::result; +use std::result; use syntax::ast; use syntax::codemap::span; use syntax::opt_vec::OptVec; diff --git a/src/librustc/rustc.rs b/src/librustc/rustc.rs index 957cf02ed77..9c0dfb46530 100644 --- a/src/librustc/rustc.rs +++ b/src/librustc/rustc.rs @@ -21,17 +21,9 @@ #[allow(non_camel_case_types)]; #[deny(deprecated_pattern)]; -#[no_core]; -#[no_std]; - -extern mod core(name = "std"); -extern mod extra(name = "extra"); +extern mod extra; extern mod syntax; -extern mod std(name = "std", vers = "0.7-pre"); - -use core::prelude::*; - use driver::driver::{host_triple, optgroups, early_error}; use driver::driver::{str_input, file_input, build_session_options}; use driver::driver::{build_session, build_configuration, parse_pretty}; @@ -40,13 +32,13 @@ use driver::driver::{compile_input}; use driver::session; use middle::lint; -use core::io; -use core::os; -use core::result; -use core::str; -use core::task; -use core::uint; -use core::vec; +use std::io; +use std::os; +use std::result; +use std::str; +use std::task; +use std::uint; +use std::vec; use extra::getopts::{groups, opt_present}; use extra::getopts; use syntax::codemap; @@ -120,15 +112,17 @@ pub mod lib { // A curious inner module that allows ::std::foo to be available in here for // macros. +/* mod std { - pub use core::cmp; - pub use core::os; - pub use core::str; - pub use core::sys; - pub use core::to_bytes; - pub use core::unstable; + pub use std::cmp; + pub use std::os; + pub use std::str; + pub use std::sys; + pub use std::to_bytes; + pub use std::unstable; pub use extra::serialize; } +*/ pub fn version(argv0: &str) { let mut vers = ~"unknown version"; @@ -193,7 +187,7 @@ pub fn describe_debug_flags() { pub fn run_compiler(args: &~[~str], demitter: diagnostic::Emitter) { // Don't display log spew by default. Can override with RUST_LOG. - ::core::logging::console_off(); + ::std::logging::console_off(); let mut args = /*bad*/copy *args; let binary = args.shift().to_managed(); @@ -305,7 +299,7 @@ fails without recording a fatal error then we've encountered a compiler bug and need to present an error. */ pub fn monitor(f: ~fn(diagnostic::Emitter)) { - use core::comm::*; + use std::comm::*; let (p, ch) = stream(); let ch = SharedChan::new(ch); let ch_capture = ch.clone(); diff --git a/src/librustc/util/common.rs b/src/librustc/util/common.rs index 351519975ad..1e2e30548ee 100644 --- a/src/librustc/util/common.rs +++ b/src/librustc/util/common.rs @@ -8,14 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use syntax::ast; use syntax::codemap::{span}; use syntax::visit; -use core::hashmap::HashSet; -use core::io; +use std::hashmap::HashSet; +use std::io; use extra; pub fn time(do_it: bool, what: ~str, thunk: &fn() -> T) -> T { diff --git a/src/librustc/util/enum_set.rs b/src/librustc/util/enum_set.rs index 3528f20cfb3..2bdb6583b23 100644 --- a/src/librustc/util/enum_set.rs +++ b/src/librustc/util/enum_set.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; #[deriving(Eq, IterBytes)] pub struct EnumSet { @@ -96,10 +95,9 @@ impl BitAnd, EnumSet> for EnumSet { #[cfg(test)] mod test { - use core::prelude::*; - use core::cast; - use core::iter; + use std::cast; + use std::iter; use util::enum_set::*; diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs index 548eebaea0b..074c73e5c0b 100644 --- a/src/librustc/util/ppaux.rs +++ b/src/librustc/util/ppaux.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use metadata::encoder; use middle::ty::{ReSkolemized, ReVar}; @@ -32,7 +31,7 @@ use syntax::parse::token; use syntax::print::pprust; use syntax::{ast, ast_util}; -use core::vec; +use std::vec; /// Produces a string suitable for debugging output. pub trait Repr { diff --git a/src/librustdoc/astsrv.rs b/src/librustdoc/astsrv.rs index 27ab3aca020..9c586ae95d1 100644 --- a/src/librustdoc/astsrv.rs +++ b/src/librustdoc/astsrv.rs @@ -17,13 +17,12 @@ query AST-related information, shielding the rest of Rustdoc from its non-sendableness. */ -use core::prelude::*; use parse; -use core::cell::Cell; -use core::comm::{stream, SharedChan, Port}; -use core::task; +use std::cell::Cell; +use std::comm::{stream, SharedChan, Port}; +use std::task; use rustc::driver::driver; use rustc::driver::session::Session; use rustc::driver::session::{basic_options, options}; diff --git a/src/librustdoc/attr_parser.rs b/src/librustdoc/attr_parser.rs index 7b5a738f7dd..7655e173e4e 100644 --- a/src/librustdoc/attr_parser.rs +++ b/src/librustdoc/attr_parser.rs @@ -15,7 +15,6 @@ The attribute parser provides methods for pulling documentation out of an AST's attributes. */ -use core::prelude::*; use syntax::ast; use syntax::attr; @@ -71,7 +70,6 @@ pub fn parse_hidden(attrs: ~[ast::attribute]) -> bool { #[cfg(test)] mod test { - use core::prelude::*; use syntax::ast; use syntax; use super::{parse_hidden, parse_crate, parse_desc}; diff --git a/src/librustdoc/attr_pass.rs b/src/librustdoc/attr_pass.rs index a2e50d37fb6..3efebe854e4 100644 --- a/src/librustdoc/attr_pass.rs +++ b/src/librustdoc/attr_pass.rs @@ -16,7 +16,6 @@ corresponding AST nodes. The information gathered here is the basis of the natural-language documentation for a crate. */ -use core::prelude::*; use astsrv; use attr_parser; @@ -27,7 +26,7 @@ use fold::Fold; use fold; use pass::Pass; -use core::vec; +use std::vec; use syntax::ast; use syntax::ast_map; @@ -235,7 +234,6 @@ fn fold_impl( #[cfg(test)] mod test { - use core::prelude::*; use astsrv; use attr_pass::run; diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs index 52851b9100a..dd929fb143b 100644 --- a/src/librustdoc/config.rs +++ b/src/librustdoc/config.rs @@ -8,15 +8,14 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; -use core::cell::Cell; -use core::os; -use core::result::Result; -use core::result; -use core::run::ProcessOutput; -use core::run; -use core::vec; +use std::cell::Cell; +use std::os; +use std::result::Result; +use std::result; +use std::run::ProcessOutput; +use std::run; +use std::vec; use extra::getopts; /// The type of document to output @@ -72,7 +71,7 @@ fn opts() -> ~[(getopts::Opt, ~str)] { } pub fn usage() { - use core::io::println; + use std::io::println; println("Usage: rustdoc [options] \n"); println("Options:\n"); @@ -245,11 +244,10 @@ pub fn maybe_find_pandoc( #[cfg(test)] mod test { - use core::prelude::*; use config::*; - use core::result; - use core::run::ProcessOutput; + use std::result; + use std::run::ProcessOutput; fn parse_config(args: &[~str]) -> Result { parse_config_(args, mock_process_output) diff --git a/src/librustdoc/demo.rs b/src/librustdoc/demo.rs index 9cac958a113..b6728e00fe4 100644 --- a/src/librustdoc/demo.rs +++ b/src/librustdoc/demo.rs @@ -21,7 +21,6 @@ * tests on this file */ -use core::prelude::*; /// The base price of a muffin on a non-holiday static price_of_a_muffin: float = 70f; diff --git a/src/librustdoc/desc_to_brief_pass.rs b/src/librustdoc/desc_to_brief_pass.rs index dbaa5e8532c..74d5d467413 100644 --- a/src/librustdoc/desc_to_brief_pass.rs +++ b/src/librustdoc/desc_to_brief_pass.rs @@ -15,7 +15,6 @@ If the first paragraph of a long description is short enough then it is interpreted as the brief description. */ -use core::prelude::*; use astsrv; use doc::ItemUtils; @@ -24,7 +23,7 @@ use fold::Fold; use fold; use pass::Pass; -use core::util; +use std::util; pub fn mk_pass() -> Pass { Pass { @@ -176,7 +175,6 @@ pub fn paragraphs(s: &str) -> ~[~str] { #[cfg(test)] mod test { - use core::prelude::*; use astsrv; use attr_pass; diff --git a/src/librustdoc/doc.rs b/src/librustdoc/doc.rs index 2fa4d3b63cd..b45550c06e4 100644 --- a/src/librustdoc/doc.rs +++ b/src/librustdoc/doc.rs @@ -10,11 +10,10 @@ //! The document model -use core::prelude::*; use doc; -use core::vec; +use std::vec; pub type AstId = int; diff --git a/src/librustdoc/extract.rs b/src/librustdoc/extract.rs index b7b2b70769b..c2127eae625 100644 --- a/src/librustdoc/extract.rs +++ b/src/librustdoc/extract.rs @@ -10,13 +10,12 @@ //! Converts the Rust AST to the rustdoc document model -use core::prelude::*; use astsrv; use doc::ItemUtils; use doc; -use core::vec; +use std::vec; use syntax::ast; use syntax::parse::token::{ident_interner, ident_to_str}; use syntax::parse::token; diff --git a/src/librustdoc/fold.rs b/src/librustdoc/fold.rs index 7cf616065d3..efb3e61e807 100644 --- a/src/librustdoc/fold.rs +++ b/src/librustdoc/fold.rs @@ -8,13 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use doc; #[cfg(test)] use extract; #[cfg(test)] use parse; -use core::vec; +use std::vec; pub struct Fold { ctxt: T, diff --git a/src/librustdoc/markdown_index_pass.rs b/src/librustdoc/markdown_index_pass.rs index 3634155b8a3..1e67f900822 100644 --- a/src/librustdoc/markdown_index_pass.rs +++ b/src/librustdoc/markdown_index_pass.rs @@ -10,7 +10,6 @@ //! Build indexes as appropriate for the markdown pass -use core::prelude::*; use astsrv; use config; @@ -164,7 +163,6 @@ pub fn pandoc_header_id(header: &str) -> ~str { #[cfg(test)] mod test { - use core::prelude::*; use astsrv; use attr_pass; diff --git a/src/librustdoc/markdown_pass.rs b/src/librustdoc/markdown_pass.rs index e9deef6b223..0705a5c1723 100644 --- a/src/librustdoc/markdown_pass.rs +++ b/src/librustdoc/markdown_pass.rs @@ -10,7 +10,6 @@ //! Generate markdown from a document tree -use core::prelude::*; use astsrv; use doc::ItemUtils; @@ -22,9 +21,9 @@ use markdown_writer::WriterFactory; use pass::Pass; use sort_pass; -use core::cell::Cell; -use core::str; -use core::vec; +use std::cell::Cell; +use std::str; +use std::vec; use syntax; pub fn mk_pass(writer_factory: WriterFactory) -> Pass { @@ -518,7 +517,6 @@ fn put_struct( #[cfg(test)] mod test { - use core::prelude::*; use astsrv; use attr_pass; diff --git a/src/librustdoc/markdown_writer.rs b/src/librustdoc/markdown_writer.rs index a093824e453..9621ea0892b 100644 --- a/src/librustdoc/markdown_writer.rs +++ b/src/librustdoc/markdown_writer.rs @@ -8,19 +8,18 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use config; use doc::ItemUtils; use doc; -use core::comm::*; -use core::comm; -use core::io; -use core::result; -use core::run; -use core::str; -use core::task; +use std::comm::*; +use std::comm; +use std::io; +use std::result; +use std::run; +use std::str; +use std::task; use extra::future; pub enum WriteInstr { @@ -104,7 +103,7 @@ fn pandoc_writer( ]; do generic_writer |markdown| { - use core::io::WriterUtil; + use std::io::WriterUtil; debug!("pandoc cmd: %s", pandoc_cmd); debug!("pandoc args: %s", pandoc_args.connect(" ")); @@ -177,7 +176,7 @@ pub fn make_filename( } fn write_file(path: &Path, s: ~str) { - use core::io::WriterUtil; + use std::io::WriterUtil; match io::file_writer(path, [io::Create, io::Truncate]) { result::Ok(writer) => { @@ -225,7 +224,6 @@ fn future_writer() -> (Writer, future::Future<~str>) { #[cfg(test)] mod test { - use core::prelude::*; use astsrv; use doc; diff --git a/src/librustdoc/page_pass.rs b/src/librustdoc/page_pass.rs index 35a433ec9de..508cf302ede 100644 --- a/src/librustdoc/page_pass.rs +++ b/src/librustdoc/page_pass.rs @@ -15,7 +15,6 @@ Each page corresponds is a logical section. There may be pages for individual modules, pages for the crate, indexes, etc. */ -use core::prelude::*; use astsrv; use config; @@ -26,8 +25,8 @@ use fold; use pass::Pass; use util::NominalOp; -use core::comm::*; -use core::task; +use std::comm::*; +use std::task; use syntax::ast; #[cfg(test)] use doc::PageUtils; diff --git a/src/librustdoc/parse.rs b/src/librustdoc/parse.rs index 138e4d49156..bf782c9d5f3 100644 --- a/src/librustdoc/parse.rs +++ b/src/librustdoc/parse.rs @@ -10,7 +10,6 @@ //! AST-parsing helpers -use core::prelude::*; use rustc::driver::driver::{file_input, str_input}; use rustc::driver::driver; diff --git a/src/librustdoc/pass.rs b/src/librustdoc/pass.rs index 3654e2c7606..3497e9515c6 100644 --- a/src/librustdoc/pass.rs +++ b/src/librustdoc/pass.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; use astsrv; diff --git a/src/librustdoc/path_pass.rs b/src/librustdoc/path_pass.rs index a7a36152ace..55ce135f277 100644 --- a/src/librustdoc/path_pass.rs +++ b/src/librustdoc/path_pass.rs @@ -10,7 +10,6 @@ //! Records the full path to items -use core::prelude::*; use astsrv; use doc::ItemUtils; diff --git a/src/librustdoc/prune_private_pass.rs b/src/librustdoc/prune_private_pass.rs index 157f33fb170..cb7da801e96 100644 --- a/src/librustdoc/prune_private_pass.rs +++ b/src/librustdoc/prune_private_pass.rs @@ -10,7 +10,6 @@ //! Prune things that are private -use core::prelude::*; use extract; use syntax::ast; @@ -21,7 +20,7 @@ use fold::Fold; use fold; use pass::Pass; -use core::util; +use std::util; pub fn mk_pass() -> Pass { Pass { diff --git a/src/librustdoc/rustdoc.rs b/src/librustdoc/rustdoc.rs index d02620229f5..6d16b9759cc 100644 --- a/src/librustdoc/rustdoc.rs +++ b/src/librustdoc/rustdoc.rs @@ -21,22 +21,17 @@ #[allow(non_implicitly_copyable_typarams)]; -#[no_std]; - -extern mod core(name = "std"); -extern mod extra(name = "extra"); - +extern mod extra; extern mod rustc; extern mod syntax; -use core::prelude::*; +use std::io; +use std::os; use config::Config; use doc::Item; use doc::ItemUtils; -use core::*; - pub mod pass; pub mod config; pub mod parse; @@ -66,15 +61,6 @@ pub mod escape_pass; pub mod prune_private_pass; pub mod util; -mod std { - pub use core::clone; - pub use core::cmp; - pub use core::os; - pub use core::str; - pub use core::sys; - pub use core::unstable; -} - pub fn main() { let args = os::args(); diff --git a/src/librustdoc/sectionalize_pass.rs b/src/librustdoc/sectionalize_pass.rs index ba433bf479d..4e297c36dd4 100644 --- a/src/librustdoc/sectionalize_pass.rs +++ b/src/librustdoc/sectionalize_pass.rs @@ -10,7 +10,6 @@ //! Breaks rustdocs into sections according to their headers -use core::prelude::*; use astsrv; use doc::ItemUtils; @@ -19,7 +18,7 @@ use fold::Fold; use fold; use pass::Pass; -use core::iterator::IteratorUtil; +use std::iterator::IteratorUtil; pub fn mk_pass() -> Pass { Pass { @@ -162,7 +161,6 @@ fn parse_header<'a>(line: &'a str) -> Option<&'a str> { #[cfg(test)] mod test { - use core::prelude::*; use astsrv; use attr_pass; diff --git a/src/librustdoc/text_pass.rs b/src/librustdoc/text_pass.rs index 6db582a60e9..58b7571305d 100644 --- a/src/librustdoc/text_pass.rs +++ b/src/librustdoc/text_pass.rs @@ -10,7 +10,6 @@ //! Generic pass for performing an operation on all descriptions -use core::prelude::*; use astsrv; use doc::ItemUtils; @@ -20,7 +19,7 @@ use fold; use pass::Pass; use util::NominalOp; -use core::cell::Cell; +use std::cell::Cell; pub fn mk_pass(name: ~str, op: @fn(&str) -> ~str) -> Pass { let op = Cell::new(op); @@ -139,7 +138,6 @@ fn fold_impl( #[cfg(test)] mod test { - use core::prelude::*; use astsrv; use attr_pass; diff --git a/src/librustdoc/trim_pass.rs b/src/librustdoc/trim_pass.rs index 8bfa12ca0b5..281a59c8cb7 100644 --- a/src/librustdoc/trim_pass.rs +++ b/src/librustdoc/trim_pass.rs @@ -40,7 +40,7 @@ mod test { #[test] fn should_trim_text() { - use core::option::Some; + use std::option::Some; let doc = mk_doc(~"#[doc = \" desc \"] \ mod m { diff --git a/src/librustdoc/tystr_pass.rs b/src/librustdoc/tystr_pass.rs index 459daaa468f..c3b02c91e74 100644 --- a/src/librustdoc/tystr_pass.rs +++ b/src/librustdoc/tystr_pass.rs @@ -10,7 +10,6 @@ //! Pulls type information out of the AST and attaches it to the document -use core::prelude::*; use astsrv; use doc::ItemUtils; @@ -21,7 +20,7 @@ use fold::Fold; use fold; use pass::Pass; -use core::vec; +use std::vec; use syntax::ast; use syntax::print::pprust; use syntax::parse::token; @@ -349,7 +348,6 @@ fn strip_struct_extra_stuff(item: @ast::item) -> @ast::item { #[cfg(test)] mod test { - use core::prelude::*; use astsrv; use doc; diff --git a/src/librustdoc/unindent_pass.rs b/src/librustdoc/unindent_pass.rs index 2bcf04c0262..7df6b320780 100644 --- a/src/librustdoc/unindent_pass.rs +++ b/src/librustdoc/unindent_pass.rs @@ -19,9 +19,8 @@ instances where the string containing the doc comment is opened in the middle of a line, and each of the following lines is indented. */ -use core::prelude::*; -use core::uint; +use std::uint; use pass::Pass; use text_pass; diff --git a/src/librustdoc/util.rs b/src/librustdoc/util.rs index fe39ac6bc50..20e64087442 100644 --- a/src/librustdoc/util.rs +++ b/src/librustdoc/util.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; // Just a named container for our op, so it can have impls pub struct NominalOp { diff --git a/src/librustpkg/api.rs b/src/librustpkg/api.rs index 9f8e925fa07..c36c6390a75 100644 --- a/src/librustpkg/api.rs +++ b/src/librustpkg/api.rs @@ -14,10 +14,10 @@ use package_id::*; use package_source::*; use version::Version; -use core::option::*; -use core::os; -use core::hashmap::*; -use core::path::*; +use std::option::*; +use std::os; +use std::hashmap::*; +use std::path::*; /// Convenience functions intended for calling from pkg.rs @@ -89,4 +89,4 @@ pub fn install_exe(sysroot: @Path, workspace: Path, name: ~str, version: Version fn mk_crate(p: Path) -> Crate { Crate { file: p, flags: ~[], cfgs: ~[] } -} \ No newline at end of file +} diff --git a/src/librustpkg/conditions.rs b/src/librustpkg/conditions.rs index caab16cd291..c44563d8703 100644 --- a/src/librustpkg/conditions.rs +++ b/src/librustpkg/conditions.rs @@ -10,7 +10,7 @@ // Useful conditions -pub use core::path::Path; +pub use std::path::Path; pub use package_id::PkgId; condition! { diff --git a/src/librustpkg/context.rs b/src/librustpkg/context.rs index 4f67118e520..230a0f915ac 100644 --- a/src/librustpkg/context.rs +++ b/src/librustpkg/context.rs @@ -10,9 +10,8 @@ // Context data structure used by rustpkg -use core::prelude::*; -use core::hashmap::HashMap; +use std::hashmap::HashMap; pub struct Ctx { // Sysroot -- if this is None, uses rustc filesearch's diff --git a/src/librustpkg/crate.rs b/src/librustpkg/crate.rs index 5e8139063de..5fe45126032 100644 --- a/src/librustpkg/crate.rs +++ b/src/librustpkg/crate.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::path::Path; -use core::vec; +use std::path::Path; +use std::vec; /// A crate is a unit of Rust code to be compiled into a binary or library pub struct Crate { diff --git a/src/librustpkg/messages.rs b/src/librustpkg/messages.rs index bde7aaeab8e..43d727c2989 100644 --- a/src/librustpkg/messages.rs +++ b/src/librustpkg/messages.rs @@ -9,8 +9,8 @@ // except according to those terms. use extra::term; -use core::io; -use core::result::*; +use std::io; +use std::result::*; pub fn note(msg: &str) { pretty_message(msg, "note: ", term::color::green, io::stdout()) diff --git a/src/librustpkg/package_id.rs b/src/librustpkg/package_id.rs index 3ff0a6073b6..ebe2aa6f92a 100644 --- a/src/librustpkg/package_id.rs +++ b/src/librustpkg/package_id.rs @@ -9,7 +9,6 @@ // except according to those terms. pub use package_path::{RemotePath, LocalPath, normalize, hash}; -use core::prelude::*; use version::{try_getting_version, Version, NoVersion, split_version}; /// Path-fragment identifier of a package such as diff --git a/src/librustpkg/package_path.rs b/src/librustpkg/package_path.rs index 161634be650..a508d2ce153 100644 --- a/src/librustpkg/package_path.rs +++ b/src/librustpkg/package_path.rs @@ -10,11 +10,11 @@ // rustpkg utilities having to do with local and remote paths -use core::path::Path; -use core::option::Some; -use core::hash; -use core::rt::io::Writer; -use core::hash::Streaming; +use std::path::Path; +use std::option::Some; +use std::hash; +use std::rt::io::Writer; +use std::hash::Streaming; /// Wrappers to prevent local and remote paths from getting confused /// (These will go away after #6407) diff --git a/src/librustpkg/package_source.rs b/src/librustpkg/package_source.rs index ebdea2537ac..24c1bb9b200 100644 --- a/src/librustpkg/package_source.rs +++ b/src/librustpkg/package_source.rs @@ -10,9 +10,9 @@ use target::*; use package_id::PkgId; -use core::path::Path; -use core::option::*; -use core::{os, run, str}; +use std::path::Path; +use std::option::*; +use std::{os, run, str}; use context::*; use crate::Crate; use messages::*; diff --git a/src/librustpkg/path_util.rs b/src/librustpkg/path_util.rs index f0a3f24c307..6371d726346 100644 --- a/src/librustpkg/path_util.rs +++ b/src/librustpkg/path_util.rs @@ -10,15 +10,14 @@ // rustpkg utilities having to do with paths and directories -use core::prelude::*; pub use package_path::{RemotePath, LocalPath, normalize}; pub use package_id::PkgId; pub use target::{OutputType, Main, Lib, Test, Bench, Target, Build, Install}; pub use version::{Version, NoVersion, split_version_general}; -use core::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; -use core::os::mkdir_recursive; -use core::os; -use core::iterator::IteratorUtil; +use std::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; +use std::os::mkdir_recursive; +use std::os; +use std::iterator::IteratorUtil; use messages::*; use package_id::*; diff --git a/src/librustpkg/rustpkg.rs b/src/librustpkg/rustpkg.rs index 550a3411b5d..d393ed69566 100644 --- a/src/librustpkg/rustpkg.rs +++ b/src/librustpkg/rustpkg.rs @@ -18,19 +18,19 @@ #[license = "MIT/ASL2"]; #[crate_type = "lib"]; -#[no_core]; -#[no_std]; - -extern mod core(name = "std"); -extern mod extra(name = "extra"); - +extern mod extra; extern mod rustc; extern mod syntax; -use core::prelude::*; -use core::*; -pub use core::path::Path; -use core::hashmap::HashMap; +use std::result; +use std::io; +use std::os; +use std::run; +use std::str; + +pub use std::path::Path; +use std::hashmap::HashMap; + use rustc::driver::{driver, session}; use rustc::metadata::filesearch; use extra::{getopts}; @@ -65,15 +65,6 @@ mod workspace; pub mod usage; -mod std { - pub use core::cmp; - pub use core::condition; - pub use core::os; - pub use core::str; - pub use core::sys; - pub use core::unstable; -} - /// A PkgScript represents user-supplied custom logic for /// special build hooks. This only exists for packages with /// an explicit package script. diff --git a/src/librustpkg/search.rs b/src/librustpkg/search.rs index e5ffc5c9d84..d04b2c8f370 100644 --- a/src/librustpkg/search.rs +++ b/src/librustpkg/search.rs @@ -9,7 +9,6 @@ // except according to those terms. use path_util::installed_library_in_workspace; -use core::prelude::*; /// If a library with path `p` matching pkg_id's name exists under sroot_opt, /// return Some(p). Return None if there's no such path or if sroot_opt is None. diff --git a/src/librustpkg/tests.rs b/src/librustpkg/tests.rs index 44a8e696bde..0e2a4f33c72 100644 --- a/src/librustpkg/tests.rs +++ b/src/librustpkg/tests.rs @@ -11,11 +11,10 @@ // rustpkg unit tests use context::Ctx; -use core::hashmap::HashMap; -use core::{io, libc, os, result, run, str, vec}; -use core::prelude::*; +use std::hashmap::HashMap; +use std::{io, libc, os, result, run, str, vec}; use extra::tempfile::mkdtemp; -use core::run::ProcessOutput; +use std::run::ProcessOutput; use package_path::*; use package_id::{PkgId}; use package_source::*; @@ -110,7 +109,7 @@ fn mk_temp_workspace(short_name: &LocalPath, version: &Version) -> Path { } fn is_rwx(p: &Path) -> bool { - use core::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; + use std::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; match p.get_mode() { None => return false, diff --git a/src/librustpkg/testsuite/fail/src/no-inferred-crates/src/zzyzx.rs b/src/librustpkg/testsuite/fail/src/no-inferred-crates/src/zzyzx.rs index c9c1f00fb08..0fd68ca3a20 100644 --- a/src/librustpkg/testsuite/fail/src/no-inferred-crates/src/zzyzx.rs +++ b/src/librustpkg/testsuite/fail/src/no-inferred-crates/src/zzyzx.rs @@ -15,7 +15,7 @@ The test runner should check that, after `rustpkg build hello-world`: * testsuite/hello-world/build/ does not contain a library */ -use core::io; +use std::io; fn main() { io::println(~"Hello world!"); diff --git a/src/librustpkg/testsuite/pass/src/hello-world/main.rs b/src/librustpkg/testsuite/pass/src/hello-world/main.rs index 2ef387d9620..c8b2ce97c0c 100644 --- a/src/librustpkg/testsuite/pass/src/hello-world/main.rs +++ b/src/librustpkg/testsuite/pass/src/hello-world/main.rs @@ -18,7 +18,7 @@ The test runner should check that, after `rustpkg build hello-world`: * testsuite/pass/hello-world/build is empty */ -use core::io; +use std::io; fn main() { io::println(~"Hello world!"); diff --git a/src/librustpkg/usage.rs b/src/librustpkg/usage.rs index 90c87210faa..fee52c3c11f 100644 --- a/src/librustpkg/usage.rs +++ b/src/librustpkg/usage.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::io; +use std::io; pub fn general() { io::println("Usage: rustpkg [options] [args..] diff --git a/src/librustpkg/util.rs b/src/librustpkg/util.rs index cb9bbf80ea8..26e26add3dc 100644 --- a/src/librustpkg/util.rs +++ b/src/librustpkg/util.rs @@ -8,8 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; -use core::{libc, os, result, str}; +use std::{libc, os, result, str}; use rustc::driver::{driver, session}; use rustc::metadata::filesearch; use extra::getopts::groups::getopts; @@ -418,4 +417,4 @@ mod test { // tjc: cheesy fn debug_flags() -> ~[~str] { ~[] } -// static debug_flags: ~[~str] = ~[~"-Z", ~"time-passes"]; \ No newline at end of file +// static debug_flags: ~[~str] = ~[~"-Z", ~"time-passes"]; diff --git a/src/librustpkg/version.rs b/src/librustpkg/version.rs index 1350751b74c..1ec15c107c7 100644 --- a/src/librustpkg/version.rs +++ b/src/librustpkg/version.rs @@ -14,8 +14,7 @@ extern mod std; use extra::semver; -use core::prelude::*; -use core::{char, os, result, run, str}; +use std::{char, os, result, run, str}; use package_path::RemotePath; use extra::tempfile::mkdtemp; diff --git a/src/librustpkg/workspace.rs b/src/librustpkg/workspace.rs index bd576dc44a4..dd2cf445302 100644 --- a/src/librustpkg/workspace.rs +++ b/src/librustpkg/workspace.rs @@ -12,7 +12,7 @@ use path_util::{rust_path, workspace_contains_package_id}; use package_id::PkgId; -use core::path::Path; +use std::path::Path; pub fn each_pkg_parent_workspace(pkgid: &PkgId, action: &fn(&Path) -> bool) -> bool { // Using the RUST_PATH, find workspaces that contain