diff options
| author | Seo Sanghyeon <sanxiyn@gmail.com> | 2016-04-19 22:40:21 +0900 |
|---|---|---|
| committer | Seo Sanghyeon <sanxiyn@gmail.com> | 2016-05-03 18:48:34 +0900 |
| commit | 7ad1900e1cdb2bd9dbf9560c8c50c5912578723c (patch) | |
| tree | 45b157326d20e186929909483a4705634e06a303 | |
| parent | 7d8100a068151512774caf15a6a88766ca9cf434 (diff) | |
| download | rust-7ad1900e1cdb2bd9dbf9560c8c50c5912578723c.tar.gz rust-7ad1900e1cdb2bd9dbf9560c8c50c5912578723c.zip | |
Remove unused trait imports flagged by lint
39 files changed, 13 insertions, 50 deletions
diff --git a/src/libcoretest/lib.rs b/src/libcoretest/lib.rs index aa7ab4b4e3f..dc01a9b5c78 100644 --- a/src/libcoretest/lib.rs +++ b/src/libcoretest/lib.rs @@ -15,7 +15,6 @@ #![feature(box_syntax)] #![feature(cell_extras)] #![feature(const_fn)] -#![feature(core_float)] #![feature(core_private_bignum)] #![feature(core_private_diy_float)] #![feature(dec2flt)] diff --git a/src/libcoretest/num/mod.rs b/src/libcoretest/num/mod.rs index 11c1bd667fb..d5a6e0f87d6 100644 --- a/src/libcoretest/num/mod.rs +++ b/src/libcoretest/num/mod.rs @@ -52,7 +52,6 @@ pub fn test_num<T>(ten: T, two: T) where mod tests { use core::option::Option; use core::option::Option::{Some, None}; - use core::num::Float; #[test] fn from_str_issue7588() { diff --git a/src/librustc_const_eval/eval.rs b/src/librustc_const_eval/eval.rs index 132caa010d4..adce0f5d45a 100644 --- a/src/librustc_const_eval/eval.rs +++ b/src/librustc_const_eval/eval.rs @@ -17,7 +17,7 @@ use self::EvalHint::*; use rustc::hir::map as ast_map; use rustc::hir::map::blocks::FnLikeNode; -use rustc::middle::cstore::{self, CrateStore, InlinedItem}; +use rustc::middle::cstore::{self, InlinedItem}; use rustc::{infer, traits}; use rustc::hir::def::Def; use rustc::hir::def_id::DefId; diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 4aaeeed3430..b31c7ab6678 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -70,7 +70,6 @@ use rustc_trans::back::link; use rustc::session::{self, config, Session, build_session, CompileResult}; use rustc::session::config::{Input, PrintRequest, OutputType, ErrorOutputType}; use rustc::session::config::{get_unstable_features_setting, nightly_options}; -use rustc::middle::cstore::CrateStore; use rustc::lint::Lint; use rustc::lint; use rustc_metadata::loader; diff --git a/src/librustc_incremental/persist/data.rs b/src/librustc_incremental/persist/data.rs index 60d644ba768..37d5f8937f1 100644 --- a/src/librustc_incremental/persist/data.rs +++ b/src/librustc_incremental/persist/data.rs @@ -11,7 +11,6 @@ //! The data that we will serialize and deserialize. use rustc::dep_graph::DepNode; -use rustc_serialize::{Decoder as RustcDecoder, Encoder as RustcEncoder}; use super::directory::DefPathIndex; diff --git a/src/librustc_incremental/persist/directory.rs b/src/librustc_incremental/persist/directory.rs index 7f4c7d919c0..796812556d2 100644 --- a/src/librustc_incremental/persist/directory.rs +++ b/src/librustc_incremental/persist/directory.rs @@ -18,7 +18,6 @@ use rustc::hir::map::DefPath; use rustc::hir::def_id::DefId; use rustc::ty; use rustc::util::nodemap::DefIdMap; -use rustc_serialize::{Decoder as RustcDecoder, Encoder as RustcEncoder}; use std::fmt::{self, Debug}; /// Index into the DefIdDirectory diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index 4bdd926869a..6a51b1a43ad 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -29,7 +29,6 @@ //! a `pub fn new()`. use rustc::hir::def::Def; -use middle::cstore::CrateStore; use rustc::hir::def_id::DefId; use middle::stability; use rustc::{cfg, infer}; diff --git a/src/librustc_lint/types.rs b/src/librustc_lint/types.rs index 891731cb296..b81a4a0efe7 100644 --- a/src/librustc_lint/types.rs +++ b/src/librustc_lint/types.rs @@ -26,7 +26,7 @@ use std::{i8, i16, i32, i64, u8, u16, u32, u64, f32, f64}; use syntax::ast; use syntax::abi::Abi; -use syntax::attr::{self, AttrMetaMethods}; +use syntax::attr; use syntax::codemap::{self, Span}; use rustc::hir; diff --git a/src/librustc_metadata/csearch.rs b/src/librustc_metadata/csearch.rs index 8e7be0e3a0f..6a79d5df80a 100644 --- a/src/librustc_metadata/csearch.rs +++ b/src/librustc_metadata/csearch.rs @@ -536,7 +536,7 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore { let mut visible_parent_map = self.visible_parent_map.borrow_mut(); if !visible_parent_map.is_empty() { return visible_parent_map; } - use rustc::middle::cstore::{CrateStore, ChildItem}; + use rustc::middle::cstore::ChildItem; use std::collections::vec_deque::VecDeque; use std::collections::hash_map::Entry; for cnum in 1 .. self.next_crate_num() { diff --git a/src/librustc_metadata/decoder.rs b/src/librustc_metadata/decoder.rs index b5b27586a7f..58bc4e2a193 100644 --- a/src/librustc_metadata/decoder.rs +++ b/src/librustc_metadata/decoder.rs @@ -43,7 +43,6 @@ use rustc::mir; use rustc::mir::visit::MutVisitor; use std::cell::Cell; -use std::io::prelude::*; use std::io; use std::rc::Rc; use std::str; diff --git a/src/librustc_metadata/encoder.rs b/src/librustc_metadata/encoder.rs index 40a7f91154f..7558e0774b3 100644 --- a/src/librustc_metadata/encoder.rs +++ b/src/librustc_metadata/encoder.rs @@ -21,7 +21,7 @@ use def_key; use tyencode; use index::{self, IndexData}; -use middle::cstore::{LOCAL_CRATE, CrateStore, InlinedItemRef, LinkMeta, tls}; +use middle::cstore::{LOCAL_CRATE, InlinedItemRef, LinkMeta, tls}; use rustc::hir::def; use rustc::hir::def_id::{CRATE_DEF_INDEX, DefId}; use middle::dependency_format::Linkage; @@ -46,7 +46,6 @@ use syntax::abi::Abi; use syntax::ast::{self, NodeId, Name, CRATE_NODE_ID, CrateNum}; use syntax::codemap::BytePos; use syntax::attr; -use syntax::attr::AttrMetaMethods; use syntax::errors::Handler; use syntax; use rbml::writer::Encoder; diff --git a/src/librustc_metadata/loader.rs b/src/librustc_metadata/loader.rs index 2316a67d9d3..4ecb7a28ef7 100644 --- a/src/librustc_metadata/loader.rs +++ b/src/librustc_metadata/loader.rs @@ -233,7 +233,6 @@ use std::cmp; use std::collections::HashMap; use std::fmt; use std::fs; -use std::io::prelude::*; use std::io; use std::path::{Path, PathBuf}; use std::ptr; diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs index d55d0d53b8c..4a4b7caf478 100644 --- a/src/librustc_privacy/lib.rs +++ b/src/librustc_privacy/lib.rs @@ -34,7 +34,6 @@ use rustc::hir::intravisit::{self, Visitor}; use rustc::dep_graph::DepNode; use rustc::lint; -use rustc::middle::cstore::CrateStore; use rustc::hir::def::{self, Def}; use rustc::hir::def_id::DefId; use rustc::middle::privacy::{AccessLevel, AccessLevels}; diff --git a/src/librustc_resolve/build_reduced_graph.rs b/src/librustc_resolve/build_reduced_graph.rs index 4dc19434c80..f5e72195bc3 100644 --- a/src/librustc_resolve/build_reduced_graph.rs +++ b/src/librustc_resolve/build_reduced_graph.rs @@ -21,7 +21,7 @@ use ParentLink::{ModuleParentLink, BlockParentLink}; use Resolver; use {resolve_error, resolve_struct_error, ResolutionError}; -use rustc::middle::cstore::{CrateStore, ChildItem, DlDef}; +use rustc::middle::cstore::{ChildItem, DlDef}; use rustc::lint; use rustc::hir::def::*; use rustc::hir::def_id::{CRATE_DEF_INDEX, DefId}; diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index e747ed15260..9ef927b6610 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -47,7 +47,6 @@ use rustc::dep_graph::DepNode; use rustc::hir::map as hir_map; use rustc::session::Session; use rustc::lint; -use rustc::middle::cstore::CrateStore; use rustc::hir::def::*; use rustc::hir::def_id::DefId; use rustc::hir::pat_util::pat_bindings; @@ -58,7 +57,6 @@ use rustc::util::nodemap::{NodeMap, FnvHashMap, FnvHashSet}; use syntax::ast::{self, FloatTy}; use syntax::ast::{CRATE_NODE_ID, Name, NodeId, CrateNum, IntTy, UintTy}; -use syntax::attr::AttrMetaMethods; use syntax::codemap::{self, Span, Pos}; use syntax::errors::DiagnosticBuilder; use syntax::parse::token::{self, keywords}; diff --git a/src/librustc_resolve/resolve_imports.rs b/src/librustc_resolve/resolve_imports.rs index f0639a85176..e37dd4cbc6e 100644 --- a/src/librustc_resolve/resolve_imports.rs +++ b/src/librustc_resolve/resolve_imports.rs @@ -25,7 +25,6 @@ use rustc::lint; use rustc::hir::def::*; use syntax::ast::{NodeId, Name}; -use syntax::attr::AttrMetaMethods; use syntax::codemap::{Span, DUMMY_SP}; use syntax::util::lev_distance::find_best_match_for_name; diff --git a/src/librustc_save_analysis/data.rs b/src/librustc_save_analysis/data.rs index b79c459920a..e654cef0c30 100644 --- a/src/librustc_save_analysis/data.rs +++ b/src/librustc_save_analysis/data.rs @@ -13,8 +13,6 @@ //! The `Dump` trait can be used together with `DumpVisitor` in order to //! retrieve the data from a crate. -use std::hash::Hasher; - use rustc::hir::def_id::DefId; use rustc::ty; use syntax::ast::{CrateNum, NodeId}; diff --git a/src/librustc_trans/back/archive.rs b/src/librustc_trans/back/archive.rs index 514fc52d008..aea61da18a0 100644 --- a/src/librustc_trans/back/archive.rs +++ b/src/librustc_trans/back/archive.rs @@ -21,8 +21,6 @@ use std::process::{Command, Output, Stdio}; use std::ptr; use std::str; -use middle::cstore::CrateStore; - use libc; use llvm::archive_ro::{ArchiveRO, Child}; use llvm::{self, ArchiveKind}; diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs index 4e77b2bc069..3e69bb204b9 100644 --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs @@ -19,7 +19,7 @@ use session::config::{OutputFilenames, Input, OutputType}; use session::filesearch; use session::search_paths::PathKind; use session::Session; -use middle::cstore::{self, CrateStore, LinkMeta}; +use middle::cstore::{self, LinkMeta}; use middle::cstore::{LinkagePreference, NativeLibraryKind}; use middle::dependency_format::Linkage; use CrateTranslation; diff --git a/src/librustc_trans/back/linker.rs b/src/librustc_trans/back/linker.rs index c02a482f812..8055e97034e 100644 --- a/src/librustc_trans/back/linker.rs +++ b/src/librustc_trans/back/linker.rs @@ -16,7 +16,6 @@ use std::path::{Path, PathBuf}; use std::process::Command; use back::archive; -use middle::cstore::CrateStore; use middle::dependency_format::Linkage; use session::Session; use session::config::CrateTypeDylib; diff --git a/src/librustc_trans/base.rs b/src/librustc_trans/base.rs index b100282781e..dd453bf9969 100644 --- a/src/librustc_trans/base.rs +++ b/src/librustc_trans/base.rs @@ -35,7 +35,6 @@ use lint; use llvm::{BasicBlockRef, Linkage, ValueRef, Vector, get_param}; use llvm; use rustc::cfg; -use middle::cstore::CrateStore; use rustc::hir::def_id::DefId; use rustc::infer; use middle::lang_items::{LangItem, ExchangeMallocFnLangItem, StartFnLangItem}; diff --git a/src/librustc_trans/common.rs b/src/librustc_trans/common.rs index 5ce7caf5deb..70348cf35e5 100644 --- a/src/librustc_trans/common.rs +++ b/src/librustc_trans/common.rs @@ -39,7 +39,7 @@ use type_::Type; use value::Value; use rustc::ty::{self, Ty, TyCtxt}; use rustc::traits::{self, SelectionContext, ProjectionMode}; -use rustc::ty::fold::{TypeFolder, TypeFoldable}; +use rustc::ty::fold::TypeFoldable; use rustc::hir; use util::nodemap::NodeMap; diff --git a/src/librustc_trans/inline.rs b/src/librustc_trans/inline.rs index 1eff09d67f9..af175fbf882 100644 --- a/src/librustc_trans/inline.rs +++ b/src/librustc_trans/inline.rs @@ -9,7 +9,7 @@ // except according to those terms. use llvm::{AvailableExternallyLinkage, InternalLinkage, SetLinkage}; -use middle::cstore::{CrateStore, FoundAst, InlinedItem}; +use middle::cstore::{FoundAst, InlinedItem}; use rustc::hir::def_id::DefId; use rustc::ty::subst::Substs; use base::{push_ctxt, trans_item, trans_fn}; diff --git a/src/librustc_typeck/check/coercion.rs b/src/librustc_typeck/check/coercion.rs index f1c6868efd2..711d695a6ef 100644 --- a/src/librustc_typeck/check/coercion.rs +++ b/src/librustc_typeck/check/coercion.rs @@ -71,7 +71,7 @@ use rustc::ty::adjustment::{AdjustUnsafeFnPointer, AdjustMutToConstPointer}; use rustc::ty::{self, LvaluePreference, TypeAndMut, Ty, TyCtxt}; use rustc::ty::fold::TypeFoldable; use rustc::ty::error::TypeError; -use rustc::ty::relate::{RelateResult, TypeRelation}; +use rustc::ty::relate::RelateResult; use util::common::indent; use std::cell::RefCell; diff --git a/src/librustc_typeck/check/intrinsic.rs b/src/librustc_typeck/check/intrinsic.rs index b71ee8722ab..29a9ae9e516 100644 --- a/src/librustc_typeck/check/intrinsic.rs +++ b/src/librustc_typeck/check/intrinsic.rs @@ -11,18 +11,15 @@ //! Type-checking for the rust-intrinsic and platform-intrinsic //! intrinsics that the compiler exposes. -use astconv::AstConv; use intrinsics; use rustc::ty::subst::{self, Substs}; use rustc::ty::FnSig; use rustc::ty::{self, Ty, TyCtxt}; -use rustc::ty::fold::TypeFolder; use {CrateCtxt, require_same_types}; use std::collections::{HashMap}; use syntax::abi::Abi; use syntax::ast; -use syntax::attr::AttrMetaMethods; use syntax::codemap::Span; use syntax::parse::token; diff --git a/src/librustc_typeck/check/method/mod.rs b/src/librustc_typeck/check/method/mod.rs index 31d95af4fbb..367cac68509 100644 --- a/src/librustc_typeck/check/method/mod.rs +++ b/src/librustc_typeck/check/method/mod.rs @@ -10,7 +10,6 @@ //! Method lookup: the secret sauce of Rust. See `README.md`. -use astconv::AstConv; use check::FnCtxt; use hir::def::Def; use hir::def_id::DefId; diff --git a/src/librustc_typeck/check/method/suggest.rs b/src/librustc_typeck/check/method/suggest.rs index 4ba8f2c9d62..cf1b609884b 100644 --- a/src/librustc_typeck/check/method/suggest.rs +++ b/src/librustc_typeck/check/method/suggest.rs @@ -13,11 +13,10 @@ use CrateCtxt; -use astconv::AstConv; use check::{self, FnCtxt, UnresolvedTypeAction, autoderef}; use rustc::hir::map as hir_map; use rustc::ty::{self, Ty, ToPolyTraitRef, ToPredicate, TypeFoldable}; -use middle::cstore::{self, CrateStore}; +use middle::cstore; use hir::def::Def; use hir::def_id::DefId; use middle::lang_items::FnOnceTraitLangItem; diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 385f04b8564..14394d91e61 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -99,8 +99,7 @@ use rustc::ty::{self, ToPolyTraitRef, Ty, TyCtxt, Visibility}; use rustc::ty::{MethodCall, MethodCallee}; use rustc::ty::adjustment; use rustc::ty::error::TypeError; -use rustc::ty::fold::{TypeFolder, TypeFoldable}; -use rustc::ty::relate::TypeRelation; +use rustc::ty::fold::TypeFoldable; use rustc::ty::util::{Representability, IntTypeExt}; use require_c_abi_if_variadic; use rscope::{ElisionFailureInfo, RegionScope}; diff --git a/src/librustc_typeck/check/regionck.rs b/src/librustc_typeck/check/regionck.rs index 5efd57c4d1f..bda4c422880 100644 --- a/src/librustc_typeck/check/regionck.rs +++ b/src/librustc_typeck/check/regionck.rs @@ -82,7 +82,6 @@ //! relation, except that a borrowed pointer never owns its //! contents. -use astconv::AstConv; use check::dropck; use check::FnCtxt; use middle::free_region::FreeRegionMap; diff --git a/src/librustc_typeck/check/wfcheck.rs b/src/librustc_typeck/check/wfcheck.rs index 25a37b6810e..ffdae233970 100644 --- a/src/librustc_typeck/check/wfcheck.rs +++ b/src/librustc_typeck/check/wfcheck.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use astconv::AstConv; use check::{FnCtxt, Inherited, blank_fn_ctxt, regionck}; use constrained_type_params::{identify_constrained_type_params, Parameter}; use CrateCtxt; @@ -17,7 +16,6 @@ use middle::region::{CodeExtent}; use rustc::ty::subst::{self, TypeSpace, FnSpace, ParamSpace, SelfSpace}; use rustc::traits; use rustc::ty::{self, Ty, TyCtxt}; -use rustc::ty::fold::{TypeFolder}; use std::cell::RefCell; use std::collections::HashSet; diff --git a/src/librustc_typeck/check/writeback.rs b/src/librustc_typeck/check/writeback.rs index ad78740921c..4341ae5dac1 100644 --- a/src/librustc_typeck/check/writeback.rs +++ b/src/librustc_typeck/check/writeback.rs @@ -13,7 +13,6 @@ // substitutions. use self::ResolveReason::*; -use astconv::AstConv; use check::FnCtxt; use hir::def_id::DefId; use hir::pat_util; diff --git a/src/librustc_typeck/coherence/overlap.rs b/src/librustc_typeck/coherence/overlap.rs index a05167dbe43..30d181abb9e 100644 --- a/src/librustc_typeck/coherence/overlap.rs +++ b/src/librustc_typeck/coherence/overlap.rs @@ -12,7 +12,6 @@ //! same type. Likewise, no two inherent impls for a given type //! constructor provide a method with the same name. -use middle::cstore::CrateStore; use hir::def_id::DefId; use rustc::traits::{self, ProjectionMode}; use rustc::infer; diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index c10488a03ef..d88bfd95367 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -73,7 +73,6 @@ use rustc::ty::subst::{Substs, FnSpace, ParamSpace, SelfSpace, TypeSpace, VecPer use rustc::ty::{ToPredicate, ImplContainer, ImplOrTraitItemContainer, TraitContainer}; use rustc::ty::{self, ToPolyTraitRef, Ty, TyCtxt, TypeScheme}; use rustc::ty::{VariantKind}; -use rustc::ty::fold::{TypeFolder}; use rustc::ty::util::IntTypeExt; use rscope::*; use rustc::dep_graph::DepNode; diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs index e13b2688788..68e4ed000b0 100644 --- a/src/librustdoc/clean/inline.rs +++ b/src/librustdoc/clean/inline.rs @@ -14,10 +14,9 @@ use std::collections::HashSet; use std::iter::once; use syntax::ast; -use syntax::attr::AttrMetaMethods; use rustc::hir; -use rustc::middle::cstore::{self, CrateStore}; +use rustc::middle::cstore; use rustc::hir::def::Def; use rustc::hir::def_id::DefId; use rustc::ty::{self, TyCtxt}; diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 35922c477cc..caf02d73e47 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -35,7 +35,7 @@ use syntax::parse::token::{self, InternedString, keywords}; use syntax::ptr::P; use rustc_trans::back::link; -use rustc::middle::cstore::{self, CrateStore}; +use rustc::middle::cstore; use rustc::middle::privacy::AccessLevels; use rustc::hir::def::Def; use rustc::hir::def_id::{DefId, DefIndex, CRATE_DEF_INDEX}; diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index 8b2e8497498..a168fe98a94 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -9,7 +9,6 @@ // except according to those terms. use std::fmt; -use std::io::prelude::*; use std::io; use externalfiles::ExternalHtml; diff --git a/src/libstd/collections/hash/bench.rs b/src/libstd/collections/hash/bench.rs index 9fae9af2d54..a1275d23d57 100644 --- a/src/libstd/collections/hash/bench.rs +++ b/src/libstd/collections/hash/bench.rs @@ -11,7 +11,6 @@ #![cfg(test)] extern crate test; -use prelude::v1::*; use self::test::Bencher; diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs index 9a605fc7bbf..e142c78569b 100644 --- a/src/libstd/io/error.rs +++ b/src/libstd/io/error.rs @@ -350,7 +350,6 @@ mod test { use prelude::v1::*; use super::{Error, ErrorKind}; use error; - use error::Error as error_Error; use fmt; use sys::os::error_string; diff --git a/src/tools/rustbook/main.rs b/src/tools/rustbook/main.rs index 5ad4982e8af..e0092f8e29e 100644 --- a/src/tools/rustbook/main.rs +++ b/src/tools/rustbook/main.rs @@ -19,10 +19,8 @@ extern crate rustdoc; extern crate rustc_back; use std::env; -use std::error::Error; use std::process; use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT, Ordering}; -use subcommand::Subcommand; use term::Term; mod term; |
