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.
This commit is contained in:
@@ -19,7 +19,6 @@ use ext;
|
||||
use parse;
|
||||
use parse::{parser, token};
|
||||
|
||||
use core::io;
|
||||
use core::vec;
|
||||
use core::hashmap::linear::LinearMap;
|
||||
|
||||
@@ -504,7 +503,6 @@ impl <K: Eq + Hash + IterBytes ,V: Copy> MapChain<K,V>{
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use super::MapChain;
|
||||
use util::testing::check_equal;
|
||||
use core::hashmap::linear::LinearMap;
|
||||
|
||||
Reference in New Issue
Block a user