about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-03-05 00:57:46 -0800
committerbors <bors@rust-lang.org>2013-03-05 00:57:46 -0800
commit75c5bc90d2d3fb3e495b38c49c7cc96797795c72 (patch)
treeb01a9f1428b1b3ed4fa126a9c8d5cbbe8056f3ce /src/libsyntax/parse/parser.rs
parent71f09813c86ad4d78d7760f4fcc8659f12532e63 (diff)
parentcb4ab76e4a17e0efc6b506af15fd1df654c043ff (diff)
downloadrust-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/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 0d0d23e0cd0..dd179171fce 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -57,7 +57,6 @@ use ast::{unnamed_field, unsafe_blk, unsafe_fn, variant, view_item};
 use ast::{view_item_, view_item_extern_mod, view_item_use};
 use ast::{view_path, view_path_glob, view_path_list, view_path_simple};
 use ast::{visibility, vstore, vstore_box, vstore_fixed, vstore_slice};
-use ast::{vstore_uniq};
 use ast;
 use ast_util::{ident_to_path, operator_prec};
 use ast_util;
@@ -72,7 +71,6 @@ use parse::lexer::TokenAndSpan;
 use parse::obsolete::{ObsoleteClassTraits, ObsoleteModeInFnType};
 use parse::obsolete::{ObsoleteLet, ObsoleteFieldTerminator};
 use parse::obsolete::{ObsoleteMoveInit, ObsoleteBinaryMove};
-use parse::obsolete::{ObsoleteStructCtor, ObsoleteWith};
 use parse::obsolete::{ObsoleteSyntax, ObsoleteLowerCaseKindBounds};
 use parse::obsolete::{ObsoleteUnsafeBlock, ObsoleteImplSyntax};
 use parse::obsolete::{ObsoleteTraitBoundSeparator, ObsoleteMutOwnedPointer};
@@ -82,16 +80,11 @@ use parse::token::{can_begin_expr, is_ident, is_ident_or_path};
 use parse::token::{is_plain_ident, INTERPOLATED, special_idents};
 use parse::token;
 use parse::{new_sub_parser_from_file, next_node_id, ParseSess};
-use print::pprust::expr_to_str;
-use util::interner::Interner;
 use opt_vec;
 use opt_vec::OptVec;
 
-use core::cmp;
 use core::either::{Either, Left, Right};
 use core::either;
-use core::result::Result;
-use core::vec::push;
 use core::vec;
 use std::oldmap::HashMap;