diff options
| author | bors <bors@rust-lang.org> | 2013-03-29 05:57:44 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-03-29 05:57:44 -0700 |
| commit | 5da9e12778ddafb46e4a5013dd133af98f3dfb98 (patch) | |
| tree | 21964b3c63c1dbd9c795dbcd5ce0bf45220054f9 /src/libsyntax/parse | |
| parent | 7f2788112d979be3e38dcb7a98ebef63f0894fd5 (diff) | |
| parent | be57d745d2517305da4625891f08af8b3eb19042 (diff) | |
| download | rust-5da9e12778ddafb46e4a5013dd133af98f3dfb98.tar.gz rust-5da9e12778ddafb46e4a5013dd133af98f3dfb98.zip | |
auto merge of #5570 : alexcrichton/rust/fix-unused-imports, r=sanxiyn
Before it wouldn't warn about unused imports in the list if something in the list was used. These commits fix that case, add a test, and remove all unused imports in lists of imports throughout the compiler.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 20 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index e5685cdb4c7..0804951327a 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -11,7 +11,7 @@ use core::prelude::*; use ast; -use codemap::{BytePos, CharPos, CodeMap, FileMap, Pos}; +use codemap::{BytePos, CharPos, CodeMap, Pos}; use diagnostic; use parse::lexer::{is_whitespace, get_str_from, reader}; use parse::lexer::{StringReader, bump, is_eof, nextch, TokenAndSpan}; diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 0ddf9111e02..cdb67129c35 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -13,16 +13,16 @@ use ast::node_id; use ast; -use codemap::{span, CodeMap, FileMap, CharPos, BytePos}; +use codemap::{span, CodeMap}; use codemap; use diagnostic::{span_handler, mk_span_handler, mk_handler, Emitter}; use parse::attr::parser_attr; -use parse::lexer::{reader, StringReader}; +use parse::lexer::reader; use parse::parser::Parser; use parse::token::{ident_interner, mk_ident_interner}; use core::io; -use core::option::{None, Option, Some}; +use core::option::{None, Option}; use core::path::Path; use core::result::{Err, Ok, Result}; diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index c52162b7f14..d93e5995d4f 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -14,7 +14,7 @@ use ast::{Sigil, BorrowedSigil, ManagedSigil, OwnedSigil, RustAbi}; use ast::{CallSugar, NoSugar, DoSugar, ForSugar}; use ast::{TyBareFn, TyClosure}; use ast::{RegionTyParamBound, TraitTyParamBound}; -use ast::{provided, public, pure_fn, purity}; +use ast::{provided, public, purity}; use ast::{_mod, add, arg, arm, attribute, bind_by_ref, bind_infer}; use ast::{bind_by_copy, bitand, bitor, bitxor, blk}; use ast::{blk_check_mode, box, by_copy, by_ref}; @@ -27,7 +27,7 @@ use ast::{expr_field, expr_fn_block, expr_if, expr_index}; use ast::{expr_lit, expr_log, expr_loop, expr_loop_body, expr_mac}; use ast::{expr_method_call, expr_paren, expr_path, expr_repeat}; use ast::{expr_ret, expr_swap, expr_struct, expr_tup, expr_unary}; -use ast::{expr_vec, expr_vstore, expr_vstore_mut_box, expr_inline_asm}; +use ast::{expr_vec, expr_vstore, expr_vstore_mut_box}; use ast::{expr_vstore_slice, expr_vstore_box}; use ast::{expr_vstore_mut_slice, expr_while, extern_fn, field, fn_decl}; use ast::{expr_vstore_uniq, TyClosure, TyBareFn, Onceness, Once, Many}; @@ -41,7 +41,7 @@ use ast::{m_imm, m_mutbl, mac_, mac_invoc_tt, matcher, match_nonterminal}; use ast::{match_seq, match_tok, method, mode, module_ns, mt, mul, mutability}; use ast::{named_field, neg, node_id, noreturn, not, pat, pat_box, pat_enum}; use ast::{pat_ident, pat_lit, pat_range, pat_region, pat_struct}; -use ast::{pat_tup, pat_uniq, pat_wild, path, private}; +use ast::{pat_tup, pat_uniq, pat_wild, private}; use ast::{rem, required}; use ast::{ret_style, return_val, self_ty, shl, shr, stmt, stmt_decl}; use ast::{stmt_expr, stmt_semi, stmt_mac, struct_def, struct_field}; @@ -50,17 +50,17 @@ use ast::{sty_box, sty_region, sty_static, sty_uniq, sty_value}; use ast::{token_tree, trait_method, trait_ref, tt_delim, tt_seq, tt_tok}; use ast::{tt_nonterminal, tuple_variant_kind, Ty, ty_, ty_bot, ty_box}; use ast::{ty_field, ty_fixed_length_vec, ty_closure, ty_bare_fn}; -use ast::{ty_infer, ty_mac, ty_method}; +use ast::{ty_infer, ty_method}; use ast::{ty_nil, TyParam, TyParamBound, ty_path, ty_ptr, ty_rptr}; use ast::{ty_tup, ty_u32, ty_uniq, ty_vec, type_value_ns, uniq}; -use ast::{unnamed_field, unsafe_blk, unsafe_fn, variant, view_item}; +use ast::{unnamed_field, unsafe_blk, unsafe_fn, 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::visibility; use ast; use ast_util::{ident_to_path, operator_prec}; use ast_util; -use codemap::{span,FssNone, BytePos, spanned, respan, mk_sp}; +use codemap::{span, BytePos, spanned, mk_sp}; use codemap; use parse::attr::parser_attr; use parse::classify; @@ -68,7 +68,7 @@ use parse::common::{seq_sep_none, token_to_str}; use parse::common::{seq_sep_trailing_disallowed, seq_sep_trailing_allowed}; use parse::lexer::reader; use parse::lexer::TokenAndSpan; -use parse::obsolete::{ObsoleteClassTraits, ObsoleteModeInFnType}; +use parse::obsolete::{ObsoleteClassTraits}; use parse::obsolete::{ObsoleteLet, ObsoleteFieldTerminator}; use parse::obsolete::{ObsoleteMoveInit, ObsoleteBinaryMove}; use parse::obsolete::{ObsoleteSyntax, ObsoleteLowerCaseKindBounds}; @@ -78,7 +78,7 @@ use parse::obsolete::{ObsoleteMutVector, ObsoleteTraitImplVisibility}; use parse::obsolete::{ObsoleteRecordType, ObsoleteRecordPattern}; use parse::obsolete::{ObsoletePostFnTySigil}; use parse::obsolete::{ObsoleteBareFnType, ObsoleteNewtypeEnum}; -use parse::obsolete::{ObsoleteMode, ObsoleteImplicitSelf}; +use parse::obsolete::ObsoleteMode; use parse::obsolete::{ObsoleteLifetimeNotation, ObsoleteConstManagedPointer}; use parse::obsolete::{ObsoletePurity, ObsoleteStaticMethod}; use parse::obsolete::{ObsoleteConstItem, ObsoleteFixedLengthVectorType}; @@ -90,7 +90,7 @@ use parse::{new_sub_parser_from_file, next_node_id, ParseSess}; use opt_vec; use opt_vec::OptVec; -use core::either::{Either, Left, Right}; +use core::either::Either; use core::either; use core::hashmap::linear::LinearSet; use core::vec; |
