diff options
| author | bors <bors@rust-lang.org> | 2013-03-05 00:57:46 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-03-05 00:57:46 -0800 |
| commit | 75c5bc90d2d3fb3e495b38c49c7cc96797795c72 (patch) | |
| tree | b01a9f1428b1b3ed4fa126a9c8d5cbbe8056f3ce /src/libcore/task | |
| parent | 71f09813c86ad4d78d7760f4fcc8659f12532e63 (diff) | |
| parent | cb4ab76e4a17e0efc6b506af15fd1df654c043ff (diff) | |
| download | rust-75c5bc90d2d3fb3e495b38c49c7cc96797795c72.tar.gz rust-75c5bc90d2d3fb3e495b38c49c7cc96797795c72.zip | |
auto merge of #5179 : alexcrichton/rust/default-warn-unused-import, r=graydon
I've found that unused imports can often start cluttering a project after a long time, and it's very useful to keep them under control. I don't like how Go forces a compiler error by default and it can't be changed, but I certainly want to know about them so I think that a warn is a good default. Now that the `unused_imports` lint option is a bit smarter, I think it's possible to change the default level to warn. This commit also removes all unused imports throughout the compiler and libraries (500+). The only odd things that I ran into were that some `use` statements had to have `#[cfg(notest)]` or `#[cfg(test)]` based on where they were. The ones with `notest` were mostly in core for modules like `cmp` whereas `cfg(test)` was for tests that weren't part of a normal `mod test` module.
Diffstat (limited to 'src/libcore/task')
| -rw-r--r-- | src/libcore/task/local_data.rs | 1 | ||||
| -rw-r--r-- | src/libcore/task/mod.rs | 8 | ||||
| -rw-r--r-- | src/libcore/task/spawn.rs | 2 |
3 files changed, 0 insertions, 11 deletions
diff --git a/src/libcore/task/local_data.rs b/src/libcore/task/local_data.rs index 185d8caae01..d9fdd51fdce 100644 --- a/src/libcore/task/local_data.rs +++ b/src/libcore/task/local_data.rs @@ -29,7 +29,6 @@ magic. use prelude::*; use task::local_data_priv::{local_get, local_pop, local_modify, local_set}; use task::rt; -use task; /** * Indexes a task-local data slot. The function's code pointer is used for diff --git a/src/libcore/task/mod.rs b/src/libcore/task/mod.rs index 0835d4400ed..ff3c8386f0b 100644 --- a/src/libcore/task/mod.rs +++ b/src/libcore/task/mod.rs @@ -33,22 +33,14 @@ * ~~~ */ -use cast; use cell::Cell; -use cmp; use cmp::Eq; -use iter; -use libc; use option; use result::Result; use comm::{stream, Chan, GenericChan, GenericPort, Port, SharedChan}; -use pipes; use prelude::*; -use ptr; use result; -use task::local_data_priv::{local_get, local_set}; use task::rt::{task_id, sched_id, rust_task}; -use task; use util; use util::replace; diff --git a/src/libcore/task/spawn.rs b/src/libcore/task/spawn.rs index 152e602eeee..74384ee3d93 100644 --- a/src/libcore/task/spawn.rs +++ b/src/libcore/task/spawn.rs @@ -77,14 +77,12 @@ use cell::Cell; use container::Map; use option; use comm::{Chan, GenericChan, GenericPort, Port, stream}; -use pipes; use prelude::*; use unstable; use ptr; use hashmap::linear::LinearSet; use task::local_data_priv::{local_get, local_set}; use task::rt::rust_task; -use task::rt::rust_closure; use task::rt; use task::{Failure, ManualThreads, PlatformThread, SchedOpts, SingleThreaded}; use task::{Success, TaskOpts, TaskResult, ThreadPerCore, ThreadPerTask}; |
