diff options
| author | Daniel Farina <daniel@fdr.io> | 2013-05-30 03:16:33 -0700 |
|---|---|---|
| committer | Daniel Farina <daniel@fdr.io> | 2013-05-30 13:08:18 -0700 |
| commit | aef1e10eba812b8144b0a4ac8d9b6e690c6e5ca7 (patch) | |
| tree | ceb3263dbb1b692ea87761c26435fb34a45e7695 /src/libstd | |
| parent | a39429887a570f05c5da3e5dc8dfbcb6eea98f49 (diff) | |
| download | rust-aef1e10eba812b8144b0a4ac8d9b6e690c6e5ca7.tar.gz rust-aef1e10eba812b8144b0a4ac8d9b6e690c6e5ca7.zip | |
Remove unnecessary 'use' forms
Fix a laundry list of warnings involving unused imports that glutted up compilation output. There are more, but there seems to be some false positives (where 'remedy' appears to break the build), but this particular set of fixes seems safe.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/cell.rs | 3 | ||||
| -rw-r--r-- | src/libstd/iterator.rs | 1 | ||||
| -rw-r--r-- | src/libstd/local_data.rs | 5 | ||||
| -rw-r--r-- | src/libstd/rand/distributions.rs | 1 | ||||
| -rw-r--r-- | src/libstd/rt/task.rs | 1 | ||||
| -rw-r--r-- | src/libstd/task/mod.rs | 10 | ||||
| -rw-r--r-- | src/libstd/task/spawn.rs | 6 | ||||
| -rw-r--r-- | src/libstd/trie.rs | 2 | ||||
| -rw-r--r-- | src/libstd/unstable/mod.rs | 3 | ||||
| -rw-r--r-- | src/libstd/util.rs | 1 |
10 files changed, 13 insertions, 20 deletions
diff --git a/src/libstd/cell.rs b/src/libstd/cell.rs index f6d4e966db9..87145acbb62 100644 --- a/src/libstd/cell.rs +++ b/src/libstd/cell.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -11,7 +11,6 @@ //! A mutable, nullable memory location use cast::transmute_mut; -use cmp; use prelude::*; use util::replace; diff --git a/src/libstd/iterator.rs b/src/libstd/iterator.rs index b13c4ca23e6..7be9e8c354e 100644 --- a/src/libstd/iterator.rs +++ b/src/libstd/iterator.rs @@ -20,7 +20,6 @@ implementing the `Iterator` trait. use cmp; use iter; use num::{Zero, One}; -use num; use prelude::*; /// An interface for dealing with "external iterators". These types of iterators diff --git a/src/libstd/local_data.rs b/src/libstd/local_data.rs index 6227f9ad388..82c01c998cf 100644 --- a/src/libstd/local_data.rs +++ b/src/libstd/local_data.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -29,7 +29,8 @@ magic. use prelude::*; use task::local_data_priv::{local_get, local_pop, local_modify, local_set, Handle}; -use task; + +#[cfg(test)] use task; /** * Indexes a task-local data slot. The function's code pointer is used for diff --git a/src/libstd/rand/distributions.rs b/src/libstd/rand/distributions.rs index a66e35f68df..cf2733976c4 100644 --- a/src/libstd/rand/distributions.rs +++ b/src/libstd/rand/distributions.rs @@ -21,7 +21,6 @@ // could implement VIZIGNOR the ZIGNOR paper for more speed. use f64; -use prelude::*; use rand::{Rng,Rand}; mod ziggurat_tables; diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index 12c683120c8..eb7282bae05 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -20,7 +20,6 @@ use prelude::*; use rt::local::Local; use rt::logging::StdErrLogger; use super::local_heap::LocalHeap; -use super::sched::Scheduler; pub struct Task { heap: LocalHeap, diff --git a/src/libstd/task/mod.rs b/src/libstd/task/mod.rs index 28fb73e6eef..b68abca8605 100644 --- a/src/libstd/task/mod.rs +++ b/src/libstd/task/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -37,22 +37,22 @@ use prelude::*; -use cast; use cell::Cell; use cmp::Eq; use comm::{stream, Chan, GenericChan, GenericPort, Port}; -use comm; -use ptr; use result::Result; use result; use rt::{context, OldTaskContext}; use task::rt::{task_id, sched_id}; -use task; use unstable::finally::Finally; use util::replace; use util; +#[cfg(test)] use cast; #[cfg(test)] use comm::SharedChan; +#[cfg(test)] use comm; +#[cfg(test)] use ptr; +#[cfg(test)] use task; mod local_data_priv; pub mod rt; diff --git a/src/libstd/task/spawn.rs b/src/libstd/task/spawn.rs index 0b345b88d62..35cf6de3a15 100644 --- a/src/libstd/task/spawn.rs +++ b/src/libstd/task/spawn.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -79,7 +79,6 @@ use cast; use cell::Cell; use container::Map; use comm::{Chan, GenericChan}; -use comm; use ptr; use hashmap::HashSet; use task::local_data_priv::{local_get, local_set, OldHandle}; @@ -89,13 +88,14 @@ use task::{Failure, ManualThreads, PlatformThread, SchedOpts, SingleThreaded}; use task::{Success, TaskOpts, TaskResult, ThreadPerCore, ThreadPerTask}; use task::{ExistingScheduler, SchedulerHandle}; use task::unkillable; -use task; use uint; use util; use unstable::sync::{Exclusive, exclusive}; use rt::local::Local; #[cfg(test)] use task::default_task_opts; +#[cfg(test)] use comm; +#[cfg(test)] use task; macro_rules! move_it ( { $x:expr } => ( unsafe { let y = *ptr::to_unsafe_ptr(&($x)); y } ) diff --git a/src/libstd/trie.rs b/src/libstd/trie.rs index 460f29d597a..e5b1385974e 100644 --- a/src/libstd/trie.rs +++ b/src/libstd/trie.rs @@ -10,8 +10,6 @@ //! An ordered map and set for integer keys implemented as a radix trie -use local_data; -use os; use prelude::*; use uint; use util::{swap, replace}; diff --git a/src/libstd/unstable/mod.rs b/src/libstd/unstable/mod.rs index 1f73aa02b01..1e226da271d 100644 --- a/src/libstd/unstable/mod.rs +++ b/src/libstd/unstable/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -14,7 +14,6 @@ use comm::{GenericChan, GenericPort}; use comm; use libc; use prelude::*; -use ptr; use task; pub mod at_exit; diff --git a/src/libstd/util.rs b/src/libstd/util.rs index 18fc6af3ac6..2b61356129e 100644 --- a/src/libstd/util.rs +++ b/src/libstd/util.rs @@ -11,7 +11,6 @@ //! Miscellaneous helpers for common patterns. use cast; -use local_data; use ptr; use prelude::*; use unstable::intrinsics; |
