From 437073868e590ff8d1aae7a6fad1d8c49056f0b0 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 4 Sep 2012 11:12:17 -0700 Subject: [PATCH] libcore: "import" -> "use" --- src/libcore/at_vec.rs | 2 +- src/libcore/bool.rs | 2 +- src/libcore/box.rs | 2 +- src/libcore/char.rs | 8 ++--- src/libcore/cmath.rs | 6 ++-- src/libcore/comm.rs | 4 +-- src/libcore/core.rs | 46 ++++++++++++------------- src/libcore/dvec.rs | 4 +-- src/libcore/either.rs | 4 +-- src/libcore/extfmt.rs | 4 +-- src/libcore/f32.rs | 4 +-- src/libcore/f64.rs | 4 +-- src/libcore/flate.rs | 2 +- src/libcore/float.rs | 24 ++++++------- src/libcore/future.rs | 6 ++-- src/libcore/hash.rs | 6 ++-- src/libcore/int-template.rs | 8 ++--- src/libcore/io.rs | 12 +++---- src/libcore/iter-trait.rs | 4 +-- src/libcore/libc.rs | 66 ++++++++++++++++++------------------ src/libcore/managed.rs | 4 +-- src/libcore/os.rs | 10 +++--- src/libcore/pipes.rs | 8 ++--- src/libcore/priv.rs | 4 +-- src/libcore/ptr.rs | 4 +-- src/libcore/result.rs | 4 +-- src/libcore/rt.rs | 8 ++--- src/libcore/run.rs | 6 ++-- src/libcore/send_map.rs | 6 ++-- src/libcore/stackwalk.rs | 6 ++-- src/libcore/str.rs | 6 ++-- src/libcore/task.rs | 4 +-- src/libcore/to_bytes.rs | 2 +- src/libcore/uint-template.rs | 6 ++-- src/libcore/uniq.rs | 2 +- src/libcore/unsafe.rs | 2 +- src/libcore/vec.rs | 8 ++--- 37 files changed, 154 insertions(+), 154 deletions(-) diff --git a/src/libcore/at_vec.rs b/src/libcore/at_vec.rs index aa937328486..4cf0b8f332d 100644 --- a/src/libcore/at_vec.rs +++ b/src/libcore/at_vec.rs @@ -1,6 +1,6 @@ //! Shared Vectors -import ptr::addr_of; +use ptr::addr_of; export init_op; export capacity; diff --git a/src/libcore/bool.rs b/src/libcore/bool.rs index 9ed06ab2705..56d4e399cac 100644 --- a/src/libcore/bool.rs +++ b/src/libcore/bool.rs @@ -6,7 +6,7 @@ //! Boolean logic -import cmp::Eq; +use cmp::Eq; export not, and, or, xor, implies; export eq, ne, is_true, is_false; diff --git a/src/libcore/box.rs b/src/libcore/box.rs index 73676f1bc4c..49fd9b8706f 100644 --- a/src/libcore/box.rs +++ b/src/libcore/box.rs @@ -4,7 +4,7 @@ #[forbid(deprecated_mode)]; #[forbid(deprecated_pattern)]; -import cmp::{Eq, Ord}; +use cmp::{Eq, Ord}; export ptr_eq; diff --git a/src/libcore/char.rs b/src/libcore/char.rs index 71284f60b6f..665adf7e35c 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -4,7 +4,7 @@ #[forbid(deprecated_mode)]; #[forbid(deprecated_pattern)]; -import cmp::Eq; +use cmp::Eq; /* Lu Uppercase_Letter an uppercase letter @@ -47,9 +47,9 @@ export is_alphabetic, to_digit, cmp, escape_default, escape_unicode; -import is_alphabetic = unicode::derived_property::Alphabetic; -import is_XID_start = unicode::derived_property::XID_Start; -import is_XID_continue = unicode::derived_property::XID_Continue; +use is_alphabetic = unicode::derived_property::Alphabetic; +use is_XID_start = unicode::derived_property::XID_Start; +use is_XID_continue = unicode::derived_property::XID_Continue; /** diff --git a/src/libcore/cmath.rs b/src/libcore/cmath.rs index 29dff86b237..4dbc4e047f3 100644 --- a/src/libcore/cmath.rs +++ b/src/libcore/cmath.rs @@ -12,9 +12,9 @@ export c_double; export c_float_targ_consts; export c_double_targ_consts; -import libc::c_int; -import libc::c_float; -import libc::c_double; +use libc::c_int; +use libc::c_float; +use libc::c_double; // function names are almost identical to C's libmath, a few have been // renamed, grep for "rename:" diff --git a/src/libcore/comm.rs b/src/libcore/comm.rs index 7be2bed4f79..4775e297795 100644 --- a/src/libcore/comm.rs +++ b/src/libcore/comm.rs @@ -27,8 +27,8 @@ * ~~~ */ -import either::Either; -import libc::size_t; +use either::Either; +use libc::size_t; export Port; export Chan; diff --git a/src/libcore/core.rs b/src/libcore/core.rs index a6ac68c1882..d763b84c162 100644 --- a/src/libcore/core.rs +++ b/src/libcore/core.rs @@ -2,28 +2,28 @@ // Export various ubiquitous types, constructors, methods. -import option::{Some, None}; -import Option = option::Option; +use option::{Some, None}; +use Option = option::Option; // XXX: snapshot rustc is generating code that wants lower-case option #[cfg(stage0)] -import option = option::Option; +use option = option::Option; -import result::{Result, Ok, Err}; +use result::{Result, Ok, Err}; -import Path = path::Path; -import GenericPath = path::GenericPath; -import WindowsPath = path::WindowsPath; -import PosixPath = path::PosixPath; +use Path = path::Path; +use GenericPath = path::GenericPath; +use WindowsPath = path::WindowsPath; +use PosixPath = path::PosixPath; -import tuple::{TupleOps, ExtendedTupleOps}; -import str::{StrSlice, UniqueStr}; -import vec::{ConstVector, CopyableVector, ImmutableVector}; -import vec::{ImmutableEqVector, ImmutableCopyableVector}; -import iter::{BaseIter, ExtendedIter, EqIter, CopyableIter}; -import iter::{CopyableOrderedIter, Times, TimesIx}; -import num::Num; -import ptr::Ptr; -import to_str::ToStr; +use tuple::{TupleOps, ExtendedTupleOps}; +use str::{StrSlice, UniqueStr}; +use vec::{ConstVector, CopyableVector, ImmutableVector}; +use vec::{ImmutableEqVector, ImmutableCopyableVector}; +use iter::{BaseIter, ExtendedIter, EqIter, CopyableIter}; +use iter::{CopyableOrderedIter, Times, TimesIx}; +use num::Num; +use ptr::Ptr; +use to_str::ToStr; export Path, WindowsPath, PosixPath, GenericPath; export Option, Some, None, unreachable; @@ -44,11 +44,11 @@ export ToStr; // The compiler has special knowlege of these so we must not duplicate them // when compiling for testing #[cfg(notest)] -import ops::{Const, Copy, Send, Owned}; +use ops::{Const, Copy, Send, Owned}; #[cfg(notest)] -import ops::{Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr, BitXor}; +use ops::{Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr, BitXor}; #[cfg(notest)] -import ops::{Shl, Shr, Index}; +use ops::{Shl, Shr, Index}; #[cfg(notest)] export Const, Copy, Send, Owned; @@ -61,11 +61,11 @@ export Shl, Shr, Index; use coreops(name = "core", vers = "0.4"); #[cfg(test)] -import coreops::ops::{Const, Copy, Send, Owned}; +use coreops::ops::{Const, Copy, Send, Owned}; #[cfg(test)] -import coreops::ops::{Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr, BitXor}; +use coreops::ops::{Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr, BitXor}; #[cfg(test)] -import coreops::ops::{Shl, Shr, Index}; +use coreops::ops::{Shl, Shr, Index}; // Export the log levels as global constants. Higher levels mean diff --git a/src/libcore/dvec.rs b/src/libcore/dvec.rs index af2a45d4267..eba1cb73cf3 100644 --- a/src/libcore/dvec.rs +++ b/src/libcore/dvec.rs @@ -9,8 +9,8 @@ // // Note that recursive use is not permitted. -import unsafe::reinterpret_cast; -import ptr::null; +use unsafe::reinterpret_cast; +use ptr::null; export DVec; export from_elem; diff --git a/src/libcore/either.rs b/src/libcore/either.rs index ea955888831..36fc13c12af 100644 --- a/src/libcore/either.rs +++ b/src/libcore/either.rs @@ -4,8 +4,8 @@ //! A type that represents one of two alternatives -import cmp::Eq; -import result::Result; +use cmp::Eq; +use result::Result; /// The either type enum Either { diff --git a/src/libcore/extfmt.rs b/src/libcore/extfmt.rs index b8cc74fe7b0..4db222ea332 100644 --- a/src/libcore/extfmt.rs +++ b/src/libcore/extfmt.rs @@ -26,8 +26,8 @@ debug!("hello, %s!", "world"); */ -import cmp::Eq; -import option::{Some, None}; +use cmp::Eq; +use option::{Some, None}; /* diff --git a/src/libcore/f32.rs b/src/libcore/f32.rs index e1cf9946284..63370479546 100644 --- a/src/libcore/f32.rs +++ b/src/libcore/f32.rs @@ -6,8 +6,8 @@ // PORT -import cmath::c_float::*; -import cmath::c_float_targ_consts::*; +use cmath::c_float::*; +use cmath::c_float_targ_consts::*; export add, sub, mul, div, rem, lt, le, eq, ne, ge, gt; export is_positive, is_negative, is_nonpositive, is_nonnegative; diff --git a/src/libcore/f64.rs b/src/libcore/f64.rs index 3abfd44e838..fdd5db359c2 100644 --- a/src/libcore/f64.rs +++ b/src/libcore/f64.rs @@ -6,8 +6,8 @@ // PORT -import cmath::c_double::*; -import cmath::c_double_targ_consts::*; +use cmath::c_double::*; +use cmath::c_double_targ_consts::*; // Even though this module exports everything defined in it, // because it contains re-exports, we also have to explicitly diff --git a/src/libcore/flate.rs b/src/libcore/flate.rs index 530cf66b55a..a1072a79718 100644 --- a/src/libcore/flate.rs +++ b/src/libcore/flate.rs @@ -1,4 +1,4 @@ -import libc::{c_void, size_t, c_int}; +use libc::{c_void, size_t, c_int}; extern mod rustrt { diff --git a/src/libcore/float.rs b/src/libcore/float.rs index 125e9852f44..5ec8dbaf3cc 100644 --- a/src/libcore/float.rs +++ b/src/libcore/float.rs @@ -30,19 +30,19 @@ export j0, j1, jn, y0, y1, yn; // PORT this must match in width according to architecture -import m_float = f64; +use m_float = f64; -import f64::{add, sub, mul, div, rem, lt, le, eq, ne, ge, gt}; -import f64::logarithm; -import f64::{acos, asin, atan2, cbrt, ceil, copysign, cosh, floor}; -import f64::{erf, erfc, exp, expm1, exp2, abs_sub}; -import f64::{mul_add, fmax, fmin, nextafter, frexp, hypot, ldexp}; -import f64::{lgamma, ln, log_radix, ln1p, log10, log2, ilog_radix}; -import f64::{modf, pow, round, sinh, tanh, tgamma, trunc}; -import f64::signbit; -import f64::{j0, j1, jn, y0, y1, yn}; -import cmp::{Eq, Ord}; -import num::from_int; +use f64::{add, sub, mul, div, rem, lt, le, eq, ne, ge, gt}; +use f64::logarithm; +use f64::{acos, asin, atan2, cbrt, ceil, copysign, cosh, floor}; +use f64::{erf, erfc, exp, expm1, exp2, abs_sub}; +use f64::{mul_add, fmax, fmin, nextafter, frexp, hypot, ldexp}; +use f64::{lgamma, ln, log_radix, ln1p, log10, log2, ilog_radix}; +use f64::{modf, pow, round, sinh, tanh, tgamma, trunc}; +use f64::signbit; +use f64::{j0, j1, jn, y0, y1, yn}; +use cmp::{Eq, Ord}; +use num::from_int; const NaN: float = 0.0/0.0; diff --git a/src/libcore/future.rs b/src/libcore/future.rs index 6b0204e6b2b..bd94b7c726d 100644 --- a/src/libcore/future.rs +++ b/src/libcore/future.rs @@ -15,9 +15,9 @@ * ~~~ */ -import either::Either; -import pipes::recv; -import unsafe::copy_lifetime; +use either::Either; +use pipes::recv; +use unsafe::copy_lifetime; export Future; export extensions; diff --git a/src/libcore/hash.rs b/src/libcore/hash.rs index 1b579e1d497..7ca42f320d9 100644 --- a/src/libcore/hash.rs +++ b/src/libcore/hash.rs @@ -13,9 +13,9 @@ * CPRNG like rand::rng. */ -import io::Writer; -import io::WriterUtil; -import to_bytes::IterBytes; +use io::Writer; +use io::WriterUtil; +use to_bytes::IterBytes; export Streaming, State, Hash, HashUtil; export default_state; diff --git a/src/libcore/int-template.rs b/src/libcore/int-template.rs index 6c972da7353..0fd8ea1d5f1 100644 --- a/src/libcore/int-template.rs +++ b/src/libcore/int-template.rs @@ -2,10 +2,10 @@ #[forbid(deprecated_mode)]; #[forbid(deprecated_pattern)]; -import T = inst::T; -import cmp::{Eq, Ord}; -import from_str::FromStr; -import num::from_int; +use T = inst::T; +use cmp::{Eq, Ord}; +use from_str::FromStr; +use num::from_int; export min_value, max_value; export min, max; diff --git a/src/libcore/io.rs b/src/libcore/io.rs index f5c4106c060..21047660e7d 100644 --- a/src/libcore/io.rs +++ b/src/libcore/io.rs @@ -4,13 +4,13 @@ Module: io Basic input/output */ -import result::Result; +use result::Result; -import cmp::Eq; -import dvec::DVec; -import libc::{c_int, c_long, c_uint, c_void, size_t, ssize_t}; -import libc::consts::os::posix88::*; -import libc::consts::os::extra::*; +use cmp::Eq; +use dvec::DVec; +use libc::{c_int, c_long, c_uint, c_void, size_t, ssize_t}; +use libc::consts::os::posix88::*; +use libc::consts::os::extra::*; #[allow(non_camel_case_types)] // not sure what to do about this type fd_t = c_int; diff --git a/src/libcore/iter-trait.rs b/src/libcore/iter-trait.rs index 39fbcf63961..b3f31211340 100644 --- a/src/libcore/iter-trait.rs +++ b/src/libcore/iter-trait.rs @@ -2,8 +2,8 @@ // workaround our lack of traits and lack of macros. See core.{rc,rs} for // how this file is used. -import cmp::{Eq, Ord}; -import inst::{IMPL_T, EACH, SIZE_HINT}; +use cmp::{Eq, Ord}; +use inst::{IMPL_T, EACH, SIZE_HINT}; export extensions; impl IMPL_T: iter::BaseIter { diff --git a/src/libcore/libc.rs b/src/libcore/libc.rs index 09dd614525e..0ba77d40663 100644 --- a/src/libcore/libc.rs +++ b/src/libcore/libc.rs @@ -44,44 +44,44 @@ // FIXME (#2006): change these to glob-exports when sufficiently supported. -import types::common::c95::*; -import types::common::c99::*; -import types::common::posix88::*; -import types::common::posix01::*; -import types::common::posix08::*; -import types::common::bsd44::*; -import types::os::arch::c95::*; -import types::os::arch::c99::*; -import types::os::arch::posix88::*; -import types::os::arch::posix01::*; -import types::os::arch::posix08::*; -import types::os::arch::bsd44::*; -import types::os::arch::extra::*; +use types::common::c95::*; +use types::common::c99::*; +use types::common::posix88::*; +use types::common::posix01::*; +use types::common::posix08::*; +use types::common::bsd44::*; +use types::os::arch::c95::*; +use types::os::arch::c99::*; +use types::os::arch::posix88::*; +use types::os::arch::posix01::*; +use types::os::arch::posix08::*; +use types::os::arch::bsd44::*; +use types::os::arch::extra::*; -import consts::os::c95::*; -import consts::os::c99::*; -import consts::os::posix88::*; -import consts::os::posix01::*; -import consts::os::posix08::*; -import consts::os::bsd44::*; -import consts::os::extra::*; +use consts::os::c95::*; +use consts::os::c99::*; +use consts::os::posix88::*; +use consts::os::posix01::*; +use consts::os::posix08::*; +use consts::os::bsd44::*; +use consts::os::extra::*; -import funcs::c95::ctype::*; -import funcs::c95::stdio::*; -import funcs::c95::stdlib::*; -import funcs::c95::string::*; +use funcs::c95::ctype::*; +use funcs::c95::stdio::*; +use funcs::c95::stdlib::*; +use funcs::c95::string::*; -import funcs::posix88::stat::*; -import funcs::posix88::stdio::*; -import funcs::posix88::fcntl::*; -import funcs::posix88::dirent::*; -import funcs::posix88::unistd::*; +use funcs::posix88::stat::*; +use funcs::posix88::stdio::*; +use funcs::posix88::fcntl::*; +use funcs::posix88::dirent::*; +use funcs::posix88::unistd::*; -import funcs::posix01::unistd::*; -import funcs::posix08::unistd::*; +use funcs::posix01::unistd::*; +use funcs::posix08::unistd::*; -import funcs::bsd44::*; -import funcs::extra::*; +use funcs::bsd44::*; +use funcs::extra::*; // FIXME (#2006): remove these 3 exports (and their uses next door in os::) // when export globs work. They provide access (for now) for os:: to dig diff --git a/src/libcore/managed.rs b/src/libcore/managed.rs index a17b0fc5a37..e2f0fd62204 100644 --- a/src/libcore/managed.rs +++ b/src/libcore/managed.rs @@ -12,8 +12,8 @@ mutation when the data structure should be immutable. #[forbid(deprecated_mode)]; #[forbid(deprecated_pattern)]; -import util::with; -import unsafe::transmute_immut; +use util::with; +use unsafe::transmute_immut; export Managed; diff --git a/src/libcore/os.rs b/src/libcore/os.rs index 5ce0a51fbf3..24e5d33cf45 100644 --- a/src/libcore/os.rs +++ b/src/libcore/os.rs @@ -20,14 +20,14 @@ * to write OS-ignorant code by default. */ -import libc::{c_char, c_void, c_int, c_uint, size_t, ssize_t, +use libc::{c_char, c_void, c_int, c_uint, size_t, ssize_t, mode_t, pid_t, FILE}; -import libc::{close, fclose}; +use libc::{close, fclose}; -import option::{Some, None}; +use option::{Some, None}; -import consts::*; -import task::TaskBuilder; +use consts::*; +use task::TaskBuilder; export close, fclose, fsync_fd, waitpid; export env, getenv, setenv, fdopen, pipe; diff --git a/src/libcore/pipes.rs b/src/libcore/pipes.rs index 077095a7036..ae78c8108eb 100644 --- a/src/libcore/pipes.rs +++ b/src/libcore/pipes.rs @@ -76,10 +76,10 @@ bounded and unbounded protocols allows for less code duplication. #[forbid(deprecated_mode)]; #[forbid(deprecated_pattern)]; -import cmp::Eq; -import unsafe::{forget, reinterpret_cast, transmute}; -import either::{Either, Left, Right}; -import option::unwrap; +use cmp::Eq; +use unsafe::{forget, reinterpret_cast, transmute}; +use either::{Either, Left, Right}; +use option::unwrap; // Things used by code generated by the pipe compiler. export entangle, get_buffer, drop_buffer; diff --git a/src/libcore/priv.rs b/src/libcore/priv.rs index 9143c30a497..5db54650a6c 100644 --- a/src/libcore/priv.rs +++ b/src/libcore/priv.rs @@ -6,8 +6,8 @@ export chan_from_global_ptr, weaken_task; -import compare_and_swap = rustrt::rust_compare_and_swap_ptr; -import task::TaskBuilder; +use compare_and_swap = rustrt::rust_compare_and_swap_ptr; +use task::TaskBuilder; #[allow(non_camel_case_types)] // runtime type type rust_port_id = uint; diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 68966d21984..c7558ffba1c 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -19,8 +19,8 @@ export buf_len; export position; export Ptr; -import cmp::{Eq, Ord}; -import libc::{c_void, size_t}; +use cmp::{Eq, Ord}; +use libc::{c_void, size_t}; #[nolink] #[abi = "cdecl"] diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 4c86e154159..5fb53b1fed4 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -1,7 +1,7 @@ //! A type representing either success or failure -import cmp::Eq; -import either::Either; +use cmp::Eq; +use either::Either; /// The result type enum Result { diff --git a/src/libcore/rt.rs b/src/libcore/rt.rs index 097ac8a71fc..60253f0c0dd 100644 --- a/src/libcore/rt.rs +++ b/src/libcore/rt.rs @@ -3,10 +3,10 @@ #[forbid(deprecated_pattern)]; //! Runtime calls emitted by the compiler. -import libc::c_char; -import libc::c_void; -import libc::size_t; -import libc::uintptr_t; +use libc::c_char; +use libc::c_void; +use libc::size_t; +use libc::uintptr_t; #[allow(non_camel_case_types)] type rust_task = c_void; diff --git a/src/libcore/run.rs b/src/libcore/run.rs index 9b9d5d81e0e..2e8d07175c9 100644 --- a/src/libcore/run.rs +++ b/src/libcore/run.rs @@ -3,9 +3,9 @@ #[forbid(deprecated_pattern)]; //! Process spawning -import option::{Some, None}; -import libc::{pid_t, c_void, c_int}; -import io::ReaderUtil; +use option::{Some, None}; +use libc::{pid_t, c_void, c_int}; +use io::ReaderUtil; export Program; export run_program; diff --git a/src/libcore/send_map.rs b/src/libcore/send_map.rs index d5323abe05a..8c805798327 100644 --- a/src/libcore/send_map.rs +++ b/src/libcore/send_map.rs @@ -4,9 +4,9 @@ Sendable hash maps. Very much a work in progress. */ -import cmp::Eq; -import hash::Hash; -import to_bytes::IterBytes; +use cmp::Eq; +use hash::Hash; +use to_bytes::IterBytes; trait SendMap { // FIXME(#3148) ^^^^ once find_ref() works, we can drop V:copy diff --git a/src/libcore/stackwalk.rs b/src/libcore/stackwalk.rs index d71ad9a1a41..2d5518525fa 100644 --- a/src/libcore/stackwalk.rs +++ b/src/libcore/stackwalk.rs @@ -1,8 +1,8 @@ // NB: Don't rely on other core mods here as this has to move into the rt -import unsafe::reinterpret_cast; -import ptr::offset; -import sys::size_of; +use unsafe::reinterpret_cast; +use ptr::offset; +use sys::size_of; type Word = uint; diff --git a/src/libcore/str.rs b/src/libcore/str.rs index cdfcbf4cd27..4cd57bf422c 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -7,9 +7,9 @@ * some heavy-duty uses, try std::rope. */ -import cmp::{Eq, Ord}; -import libc::size_t; -import io::WriterUtil; +use cmp::{Eq, Ord}; +use libc::size_t; +use io::WriterUtil; export // Creating a string diff --git a/src/libcore/task.rs b/src/libcore/task.rs index 7a898985c18..5303c9d7bf2 100644 --- a/src/libcore/task.rs +++ b/src/libcore/task.rs @@ -27,8 +27,8 @@ * ~~~ */ -import cmp::Eq; -import result::Result; +use cmp::Eq; +use result::Result; export Task; export TaskResult; diff --git a/src/libcore/to_bytes.rs b/src/libcore/to_bytes.rs index e379b3dbc68..077f56cab45 100644 --- a/src/libcore/to_bytes.rs +++ b/src/libcore/to_bytes.rs @@ -2,7 +2,7 @@ #[forbid(deprecated_mode)]; #[forbid(deprecated_pattern)]; -import io::Writer; +use io::Writer; type Cb = fn(buf: &[const u8]) -> bool; diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs index cf4abe4e16f..c54c8a8c5eb 100644 --- a/src/libcore/uint-template.rs +++ b/src/libcore/uint-template.rs @@ -2,9 +2,9 @@ #[forbid(deprecated_mode)]; #[forbid(deprecated_pattern)]; -import T = inst::T; -import cmp::{Eq, Ord}; -import from_str::FromStr; +use T = inst::T; +use cmp::{Eq, Ord}; +use from_str::FromStr; export min_value, max_value; export min, max; diff --git a/src/libcore/uniq.rs b/src/libcore/uniq.rs index a5e624079b7..8cdacba0286 100644 --- a/src/libcore/uniq.rs +++ b/src/libcore/uniq.rs @@ -1,6 +1,6 @@ //! Operations on unique pointer types -import cmp::{Eq, Ord}; +use cmp::{Eq, Ord}; impl ~const T : Eq { pure fn eq(&&other: ~const T) -> bool { *self == *other } diff --git a/src/libcore/unsafe.rs b/src/libcore/unsafe.rs index c2102eb2bcd..86d78528e4d 100644 --- a/src/libcore/unsafe.rs +++ b/src/libcore/unsafe.rs @@ -9,7 +9,7 @@ export unwrap_shared_mutable_state; export Exclusive, exclusive, unwrap_exclusive; export copy_lifetime; -import task::atomically; +use task::atomically; #[abi = "rust-intrinsic"] extern mod rusti { diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs index 5242505565a..85aebc9ee90 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -1,9 +1,9 @@ //! Vectors -import cmp::{Eq, Ord}; -import option::{Some, None}; -import ptr::addr_of; -import libc::size_t; +use cmp::{Eq, Ord}; +use option::{Some, None}; +use ptr::addr_of; +use libc::size_t; export append; export append_one;