diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2014-12-19 14:02:22 +0200 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2014-12-20 07:49:37 +0200 |
| commit | b45d30da34142fc33dd41bbf67c7dfc1a69ddf01 (patch) | |
| tree | cff82472a01b56c5a8f0113a33c4821db3a8a87f /src/libstd | |
| parent | f95e0c21aaf752cf1401c872dfb1d8de1a22b6f2 (diff) | |
| download | rust-b45d30da34142fc33dd41bbf67c7dfc1a69ddf01.tar.gz rust-b45d30da34142fc33dd41bbf67c7dfc1a69ddf01.zip | |
Fix fallout of removing import_shadowing in tests.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/ascii.rs | 1 | ||||
| -rw-r--r-- | src/libstd/bitflags.rs | 1 | ||||
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 3 | ||||
| -rw-r--r-- | src/libstd/collections/hash/set.rs | 1 | ||||
| -rw-r--r-- | src/libstd/io/buffered.rs | 1 | ||||
| -rw-r--r-- | src/libstd/io/fs.rs | 4 | ||||
| -rw-r--r-- | src/libstd/io/mem.rs | 5 | ||||
| -rw-r--r-- | src/libstd/io/timer.rs | 6 | ||||
| -rw-r--r-- | src/libstd/lib.rs | 2 | ||||
| -rw-r--r-- | src/libstd/num/f32.rs | 5 | ||||
| -rw-r--r-- | src/libstd/num/f64.rs | 5 | ||||
| -rw-r--r-- | src/libstd/os.rs | 1 | ||||
| -rw-r--r-- | src/libstd/path/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/path/posix.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sync/future.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sync/task_pool.rs | 4 | ||||
| -rw-r--r-- | src/libstd/thread.rs | 4 |
17 files changed, 13 insertions, 34 deletions
diff --git a/src/libstd/ascii.rs b/src/libstd/ascii.rs index 2c4dc5313bb..08b17f25e29 100644 --- a/src/libstd/ascii.rs +++ b/src/libstd/ascii.rs @@ -633,7 +633,6 @@ mod tests { use prelude::*; use super::*; use char::from_u32; - use str::StrPrelude; macro_rules! v2ascii { ( [$($e:expr),*]) => (&[$(Ascii{chr:$e}),*]); diff --git a/src/libstd/bitflags.rs b/src/libstd/bitflags.rs index f467b77dbf4..c7cf0b5bc8e 100644 --- a/src/libstd/bitflags.rs +++ b/src/libstd/bitflags.rs @@ -315,7 +315,6 @@ macro_rules! bitflags { #[cfg(test)] #[allow(non_upper_case_globals)] mod tests { - use kinds::Copy; use hash; use option::Option::{Some, None}; use ops::{BitOr, BitAnd, BitXor, Sub, Not}; diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 6bfea7e3cb2..d068c4610be 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1428,9 +1428,8 @@ mod test_map { use super::HashMap; use super::{Occupied, Vacant}; - use cmp::Equiv; use hash; - use iter::{Iterator,range_inclusive,range_step_inclusive}; + use iter::{range_inclusive, range_step_inclusive}; use cell::RefCell; use rand::{weak_rng, Rng}; diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index 67c0f887832..71cc4a1e5a6 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -678,7 +678,6 @@ mod test_set { use prelude::*; use super::HashSet; - use slice::PartialEqSliceExt; #[test] fn test_disjoint() { diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 25f05940807..9d9e8827571 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -409,7 +409,6 @@ mod test { use super::super::{IoResult, EndOfFile}; use super::super::mem::MemReader; use self::test::Bencher; - use str::StrPrelude; /// A type, free to create, primarily intended for benchmarking creation of /// wrappers that, just for construction, don't need a Reader/Writer that diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs index fd3bae73cd3..4e736908c37 100644 --- a/src/libstd/io/fs.rs +++ b/src/libstd/io/fs.rs @@ -823,10 +823,6 @@ mod test { use io; use str; use io::fs::*; - use path::Path; - use io; - use ops::Drop; - use str::StrPrelude; macro_rules! check { ($e:expr) => ( match $e { diff --git a/src/libstd/io/mem.rs b/src/libstd/io/mem.rs index 71e8cb4b5ec..431e11cf9ca 100644 --- a/src/libstd/io/mem.rs +++ b/src/libstd/io/mem.rs @@ -398,13 +398,12 @@ impl<'a> Buffer for BufReader<'a> { #[cfg(test)] mod test { - extern crate test; + extern crate "test" as test_crate; use prelude::*; use super::*; use io::*; use io; - use self::test::Bencher; - use str::StrPrelude; + use self::test_crate::Bencher; #[test] fn test_vec_writer() { diff --git a/src/libstd/io/timer.rs b/src/libstd/io/timer.rs index 79048c37ab5..953effe4345 100644 --- a/src/libstd/io/timer.rs +++ b/src/libstd/io/timer.rs @@ -225,11 +225,11 @@ fn in_ms_u64(d: Duration) -> u64 { #[cfg(test)] mod test { - use super::*; - use time::Duration; - use task::spawn; use prelude::*; + use super::Timer; + use time::Duration; + #[test] fn test_io_timer_sleep_simple() { let mut timer = Timer::new().unwrap(); diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index c46ebae8675..7de3e1c961a 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -157,7 +157,7 @@ pub use core::unit; pub use core::result; pub use core::option; -pub use alloc::boxed; +#[cfg(not(test))] pub use alloc::boxed; pub use alloc::rc; pub use core_collections::slice; diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs index 60b17de1718..d307e1f7415 100644 --- a/src/libstd/num/f32.rs +++ b/src/libstd/num/f32.rs @@ -349,7 +349,6 @@ pub fn to_str_exp_digits(num: f32, dig: uint, upper: bool) -> String { mod tests { use f32::*; use num::*; - use num; #[test] fn test_min_nan() { @@ -364,8 +363,8 @@ mod tests { } #[test] - fn test_num() { - num::test_num(10f32, 2f32); + fn test_num_f32() { + test_num(10f32, 2f32); } #[test] diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index 4b31e33236d..dfe20d59c82 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -357,7 +357,6 @@ pub fn to_str_exp_digits(num: f64, dig: uint, upper: bool) -> String { mod tests { use f64::*; use num::*; - use num; #[test] fn test_min_nan() { @@ -372,8 +371,8 @@ mod tests { } #[test] - fn test_num() { - num::test_num(10f64, 2f64); + fn test_num_f64() { + test_num(10f64, 2f64); } #[test] diff --git a/src/libstd/os.rs b/src/libstd/os.rs index dcc73f7844a..20a72f45fbf 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -1425,7 +1425,6 @@ mod arch_consts { #[cfg(test)] mod tests { use prelude::*; - use c_str::ToCStr; use option; use os::{env, getcwd, getenv, make_absolute}; use os::{split_paths, join_paths, setenv, unsetenv}; diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs index 8f98329a4be..ed4bb6ee081 100644 --- a/src/libstd/path/mod.rs +++ b/src/libstd/path/mod.rs @@ -931,8 +931,6 @@ fn contains_nul<T: BytesContainer>(v: &T) -> bool { #[cfg(test)] mod tests { use prelude::*; - use super::{GenericPath, PosixPath, WindowsPath}; - use c_str::ToCStr; #[test] fn test_cstring() { diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 62f64159c04..88907951673 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -445,7 +445,6 @@ mod tests { use prelude::*; use super::*; use str; - use str::StrPrelude; macro_rules! t { (s: $path:expr, $exp:expr) => ( diff --git a/src/libstd/sync/future.rs b/src/libstd/sync/future.rs index 5e9d234c642..51899a87a32 100644 --- a/src/libstd/sync/future.rs +++ b/src/libstd/sync/future.rs @@ -153,7 +153,6 @@ mod test { use prelude::*; use sync::Future; use task; - use comm::channel; #[test] fn test_from_value() { diff --git a/src/libstd/sync/task_pool.rs b/src/libstd/sync/task_pool.rs index 793825f1b08..366e4b7d35b 100644 --- a/src/libstd/sync/task_pool.rs +++ b/src/libstd/sync/task_pool.rs @@ -131,10 +131,8 @@ fn spawn_in_pool(jobs: Arc<Mutex<Receiver<Thunk>>>) { #[cfg(test)] mod test { - use core::prelude::*; + use prelude::*; use super::*; - use comm::channel; - use iter::range; const TEST_TASKS: uint = 4u; diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs index ff9ee01b40a..89773207347 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread.rs @@ -428,13 +428,11 @@ impl<T: Send> Drop for JoinGuard<T> { #[cfg(test)] mod test { + use prelude::*; use any::{Any, AnyRefExt}; use boxed::BoxAny; - use prelude::*; - use result::Result::{Ok, Err}; use result; use std::io::{ChanReader, ChanWriter}; - use string::String; use thunk::Thunk; use super::{Thread, Builder}; |
