about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-04-16 18:31:11 -0700
committerbors <bors@rust-lang.org>2016-04-16 18:31:11 -0700
commit054a4b4019efe1f4a9800a5a322c4a0da5aef11c (patch)
tree26146e62960b7b89bd8304ae62c22c8dc154c5e4
parentae33aa74f4e03b11a9a82e10dbf7369c3ae6bd04 (diff)
parent01fb27f64814dbd2fef755af4fd6197b1fe74240 (diff)
downloadrust-054a4b4019efe1f4a9800a5a322c4a0da5aef11c.tar.gz
rust-054a4b4019efe1f4a9800a5a322c4a0da5aef11c.zip
Auto merge of #32909 - sanxiyn:unused-trait-import-2, r=alexcrichton
Remove unused trait imports
-rw-r--r--src/libcore/fmt/builders.rs2
-rw-r--r--src/libcore/num/mod.rs2
-rw-r--r--src/libcore/option.rs1
-rw-r--r--src/libcore/slice.rs2
-rw-r--r--src/libcore/str/mod.rs2
-rw-r--r--src/librustc/infer/combine.rs4
-rw-r--r--src/librustc/infer/error_reporting.rs1
-rw-r--r--src/librustc/infer/mod.rs2
-rw-r--r--src/librustc/lint/context.rs2
-rw-r--r--src/librustc/middle/dead.rs2
-rw-r--r--src/librustc/middle/dependency_format.rs1
-rw-r--r--src/librustc/middle/lang_items.rs1
-rw-r--r--src/librustc/middle/stability.rs2
-rw-r--r--src/librustc/middle/weak_lang_items.rs1
-rw-r--r--src/librustc/session/config.rs1
-rw-r--r--src/librustc/session/filesearch.rs1
-rw-r--r--src/librustc/traits/specialize/mod.rs1
-rw-r--r--src/librustc/traits/specialize/specialization_graph.rs1
-rw-r--r--src/librustc/ty/context.rs2
-rw-r--r--src/librustc/ty/mod.rs5
-rw-r--r--src/librustc/ty/trait_def.rs1
-rw-r--r--src/librustc/ty/util.rs2
-rw-r--r--src/libstd/sys/unix/fs.rs1
-rw-r--r--src/libsyntax/errors/mod.rs3
-rw-r--r--src/libsyntax/parse/mod.rs1
-rw-r--r--src/libsyntax/parse/parser.rs1
-rw-r--r--src/libsyntax/util/interner.rs2
-rw-r--r--src/libtest/lib.rs2
28 files changed, 13 insertions, 36 deletions
diff --git a/src/libcore/fmt/builders.rs b/src/libcore/fmt/builders.rs
index d33746389a0..6cac80ab624 100644
--- a/src/libcore/fmt/builders.rs
+++ b/src/libcore/fmt/builders.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use prelude::v1::*;
-use fmt::{self, Write, FlagV1};
+use fmt::{self, FlagV1};
 
 struct PadAdapter<'a, 'b: 'a> {
     fmt: &'a mut fmt::Formatter<'b>,
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index 9af8ef53851..f0bbe9672ab 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -14,7 +14,7 @@
 #![allow(missing_docs)]
 
 use char::CharExt;
-use cmp::{Eq, PartialOrd};
+use cmp::PartialOrd;
 use convert::From;
 use fmt;
 use intrinsics;
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index beed2075d04..045c1f9feaf 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -142,7 +142,6 @@
 use self::Option::*;
 
 use clone::Clone;
-use cmp::{Eq, Ord};
 use default::Default;
 use iter::ExactSizeIterator;
 use iter::{Iterator, DoubleEndedIterator, FromIterator, IntoIterator};
diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs
index eb12ee28177..07f76aca14d 100644
--- a/src/libcore/slice.rs
+++ b/src/libcore/slice.rs
@@ -41,7 +41,7 @@ use default::Default;
 use fmt;
 use intrinsics::assume;
 use iter::*;
-use ops::{FnMut, self, Index};
+use ops::{FnMut, self};
 use ops::RangeFull;
 use option::Option;
 use option::Option::{None, Some};
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index f3c31d59fc4..2c34caf63b8 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -19,7 +19,6 @@ use self::pattern::{Searcher, ReverseSearcher, DoubleEndedSearcher};
 
 use char::{self, CharExt};
 use clone::Clone;
-use cmp::Eq;
 use convert::AsRef;
 use default::Default;
 use fmt;
@@ -1319,7 +1318,6 @@ Section: Trait implementations
 
 mod traits {
     use cmp::{Ord, Ordering, PartialEq, PartialOrd, Eq};
-    use iter::Iterator;
     use option::Option;
     use option::Option::Some;
     use ops;
diff --git a/src/librustc/infer/combine.rs b/src/librustc/infer/combine.rs
index 67669c54ac5..2a27da06612 100644
--- a/src/librustc/infer/combine.rs
+++ b/src/librustc/infer/combine.rs
@@ -44,8 +44,8 @@ use super::type_variable::{RelationDir, BiTo, EqTo, SubtypeOf, SupertypeOf};
 use ty::{IntType, UintType};
 use ty::{self, Ty, TyCtxt};
 use ty::error::TypeError;
-use ty::fold::{TypeFolder, TypeFoldable};
-use ty::relate::{Relate, RelateResult, TypeRelation};
+use ty::fold::TypeFoldable;
+use ty::relate::{RelateResult, TypeRelation};
 use traits::PredicateObligations;
 
 use syntax::ast;
diff --git a/src/librustc/infer/error_reporting.rs b/src/librustc/infer/error_reporting.rs
index a7553f4eb1f..bcf854009e5 100644
--- a/src/librustc/infer/error_reporting.rs
+++ b/src/librustc/infer/error_reporting.rs
@@ -77,7 +77,6 @@ use hir::map as ast_map;
 use hir;
 use hir::print as pprust;
 
-use middle::cstore::CrateStore;
 use hir::def::Def;
 use hir::def_id::DefId;
 use infer::{self, TypeOrigin};
diff --git a/src/librustc/infer/mod.rs b/src/librustc/infer/mod.rs
index 4c1216aa862..96acb708315 100644
--- a/src/librustc/infer/mod.rs
+++ b/src/librustc/infer/mod.rs
@@ -31,7 +31,7 @@ use ty::adjustment;
 use ty::{TyVid, IntVid, FloatVid};
 use ty::{self, Ty, TyCtxt};
 use ty::error::{ExpectedFound, TypeError, UnconstrainedNumeric};
-use ty::fold::{TypeFolder, TypeFoldable};
+use ty::fold::TypeFoldable;
 use ty::relate::{Relate, RelateResult, TypeRelation};
 use traits::{self, PredicateObligations, ProjectionMode};
 use rustc_data_structures::unify::{self, UnificationTable};
diff --git a/src/librustc/lint/context.rs b/src/librustc/lint/context.rs
index 1c6dd265889..684cfbea3f5 100644
--- a/src/librustc/lint/context.rs
+++ b/src/librustc/lint/context.rs
@@ -30,7 +30,7 @@ use middle::privacy::AccessLevels;
 use ty::TyCtxt;
 use session::{config, early_error, Session};
 use lint::{Level, LevelSource, Lint, LintId, LintArray, LintPass};
-use lint::{EarlyLintPass, EarlyLintPassObject, LateLintPass, LateLintPassObject};
+use lint::{EarlyLintPassObject, LateLintPass, LateLintPassObject};
 use lint::{Default, CommandLine, Node, Allow, Warn, Deny, Forbid};
 use lint::builtin;
 use util::nodemap::FnvHashMap;
diff --git a/src/librustc/middle/dead.rs b/src/librustc/middle/dead.rs
index dcdc02c9df6..576a9bb33e8 100644
--- a/src/librustc/middle/dead.rs
+++ b/src/librustc/middle/dead.rs
@@ -25,7 +25,7 @@ use lint;
 
 use std::collections::HashSet;
 use syntax::{ast, codemap};
-use syntax::attr::{self, AttrMetaMethods};
+use syntax::attr;
 
 // Any local node that may call something in its body block should be
 // explored. For example, if it's a live NodeItem that is a
diff --git a/src/librustc/middle/dependency_format.rs b/src/librustc/middle/dependency_format.rs
index aac6f1edc05..c2498b7b5ee 100644
--- a/src/librustc/middle/dependency_format.rs
+++ b/src/librustc/middle/dependency_format.rs
@@ -65,7 +65,6 @@ use syntax::ast;
 
 use session;
 use session::config;
-use middle::cstore::CrateStore;
 use middle::cstore::LinkagePreference::{self, RequireStatic, RequireDynamic};
 use util::nodemap::FnvHashMap;
 
diff --git a/src/librustc/middle/lang_items.rs b/src/librustc/middle/lang_items.rs
index 83929c17ca3..853477ac97c 100644
--- a/src/librustc/middle/lang_items.rs
+++ b/src/librustc/middle/lang_items.rs
@@ -24,7 +24,6 @@ pub use self::LangItem::*;
 use dep_graph::DepNode;
 use hir::map as hir_map;
 use session::Session;
-use middle::cstore::CrateStore;
 use hir::def_id::DefId;
 use ty;
 use middle::weak_lang_items;
diff --git a/src/librustc/middle/stability.rs b/src/librustc/middle/stability.rs
index 6c7c7f160f4..5962142ca4a 100644
--- a/src/librustc/middle/stability.rs
+++ b/src/librustc/middle/stability.rs
@@ -17,7 +17,7 @@ use dep_graph::DepNode;
 use hir::map as hir_map;
 use session::Session;
 use lint;
-use middle::cstore::{CrateStore, LOCAL_CRATE};
+use middle::cstore::LOCAL_CRATE;
 use hir::def::Def;
 use hir::def_id::{CRATE_DEF_INDEX, DefId};
 use ty::{self, TyCtxt};
diff --git a/src/librustc/middle/weak_lang_items.rs b/src/librustc/middle/weak_lang_items.rs
index 74bb41785cb..5fe6076e538 100644
--- a/src/librustc/middle/weak_lang_items.rs
+++ b/src/librustc/middle/weak_lang_items.rs
@@ -12,7 +12,6 @@
 
 use session::config;
 use session::Session;
-use middle::cstore::CrateStore;
 use middle::lang_items;
 
 use syntax::ast;
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 4ea6baca367..472f526e914 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -28,7 +28,6 @@ use syntax::attr;
 use syntax::attr::AttrMetaMethods;
 use syntax::errors::{ColorConfig, Handler};
 use syntax::parse;
-use syntax::parse::lexer::Reader;
 use syntax::parse::token::InternedString;
 use syntax::feature_gate::UnstableFeatures;
 
diff --git a/src/librustc/session/filesearch.rs b/src/librustc/session/filesearch.rs
index e54acf3fdc3..a3eea324fd8 100644
--- a/src/librustc/session/filesearch.rs
+++ b/src/librustc/session/filesearch.rs
@@ -15,7 +15,6 @@ pub use self::FileMatch::*;
 use std::collections::HashSet;
 use std::env;
 use std::fs;
-use std::io::prelude::*;
 use std::path::{Path, PathBuf};
 
 use session::search_paths::{SearchPaths, PathKind};
diff --git a/src/librustc/traits/specialize/mod.rs b/src/librustc/traits/specialize/mod.rs
index 63647515a97..e78a490bc4c 100644
--- a/src/librustc/traits/specialize/mod.rs
+++ b/src/librustc/traits/specialize/mod.rs
@@ -20,7 +20,6 @@
 use super::{SelectionContext, FulfillmentContext};
 use super::util::{fresh_type_vars_for_impl, impl_trait_ref_and_oblig};
 
-use middle::cstore::CrateStore;
 use hir::def_id::DefId;
 use infer::{self, InferCtxt, TypeOrigin};
 use middle::region;
diff --git a/src/librustc/traits/specialize/specialization_graph.rs b/src/librustc/traits/specialize/specialization_graph.rs
index 3c65e368db5..7508f123477 100644
--- a/src/librustc/traits/specialize/specialization_graph.rs
+++ b/src/librustc/traits/specialize/specialization_graph.rs
@@ -13,7 +13,6 @@ use std::rc::Rc;
 
 use super::{Overlap, specializes};
 
-use middle::cstore::CrateStore;
 use hir::def_id::DefId;
 use infer;
 use traits::{self, ProjectionMode};
diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs
index bdba700f49a..61c49475ac4 100644
--- a/src/librustc/ty/context.rs
+++ b/src/librustc/ty/context.rs
@@ -15,7 +15,7 @@ use hir::map as ast_map;
 use session::Session;
 use lint;
 use middle;
-use middle::cstore::{CrateStore, LOCAL_CRATE};
+use middle::cstore::LOCAL_CRATE;
 use hir::def::DefMap;
 use hir::def_id::DefId;
 use middle::free_region::FreeRegionMap;
diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs
index 0377ef92a6f..dda5f699bae 100644
--- a/src/librustc/ty/mod.rs
+++ b/src/librustc/ty/mod.rs
@@ -21,14 +21,13 @@ pub use self::fold::TypeFoldable;
 use dep_graph::{self, DepNode};
 use hir::map as ast_map;
 use middle;
-use middle::cstore::{self, CrateStore, LOCAL_CRATE};
+use middle::cstore::{self, LOCAL_CRATE};
 use hir::def::{self, Def, ExportMap};
 use hir::def_id::DefId;
 use middle::lang_items::{FnTraitLangItem, FnMutTraitLangItem, FnOnceTraitLangItem};
 use middle::region::{CodeExtent};
 use traits;
 use ty;
-use ty::fold::TypeFolder;
 use ty::subst::{Subst, Substs, VecPerParamSpace};
 use ty::walk::TypeWalker;
 use util::common::MemoizationMap;
@@ -36,7 +35,7 @@ use util::nodemap::NodeSet;
 use util::nodemap::FnvHashMap;
 
 use serialize::{Encodable, Encoder, Decodable, Decoder};
-use std::borrow::{Borrow, Cow};
+use std::borrow::Cow;
 use std::cell::Cell;
 use std::hash::{Hash, Hasher};
 use std::iter;
diff --git a/src/librustc/ty/trait_def.rs b/src/librustc/ty/trait_def.rs
index 39a3837ae7f..faae95e7116 100644
--- a/src/librustc/ty/trait_def.rs
+++ b/src/librustc/ty/trait_def.rs
@@ -14,7 +14,6 @@ use traits::{self, specialization_graph};
 use ty;
 use ty::fast_reject;
 use ty::{Ty, TyCtxt, TraitRef};
-use std::borrow::{Borrow};
 use std::cell::{Cell, RefCell};
 use syntax::ast::Name;
 use hir;
diff --git a/src/librustc/ty/util.rs b/src/librustc/ty/util.rs
index eb1630db980..2251794def4 100644
--- a/src/librustc/ty/util.rs
+++ b/src/librustc/ty/util.rs
@@ -25,7 +25,7 @@ use rustc_const_math::{ConstInt, ConstIsize, ConstUsize};
 use std::cmp;
 use std::hash::{Hash, SipHasher, Hasher};
 use syntax::ast::{self, Name};
-use syntax::attr::{self, AttrMetaMethods, SignedInt, UnsignedInt};
+use syntax::attr::{self, SignedInt, UnsignedInt};
 use syntax::codemap::Span;
 
 use hir;
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs
index 810a34478c5..d5d17e7ee12 100644
--- a/src/libstd/sys/unix/fs.rs
+++ b/src/libstd/sys/unix/fs.rs
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 use prelude::v1::*;
-use io::prelude::*;
 use os::unix::prelude::*;
 
 use ffi::{CString, CStr, OsString, OsStr};
diff --git a/src/libsyntax/errors/mod.rs b/src/libsyntax/errors/mod.rs
index c8c12d5a883..acf65fe15b1 100644
--- a/src/libsyntax/errors/mod.rs
+++ b/src/libsyntax/errors/mod.rs
@@ -19,7 +19,6 @@ use errors::emitter::{Emitter, EmitterWriter};
 
 use std::cell::{RefCell, Cell};
 use std::{error, fmt};
-use std::io::prelude::*;
 use std::rc::Rc;
 use term;
 
@@ -653,8 +652,6 @@ pub enum Level {
 
 impl fmt::Display for Level {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        use std::fmt::Display;
-
         self.to_str().fmt(f)
     }
 }
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index ea5d6739e6d..29b1d5b9aff 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -19,7 +19,6 @@ use ptr::P;
 use str::char_at;
 
 use std::cell::RefCell;
-use std::io::Read;
 use std::iter;
 use std::path::{Path, PathBuf};
 use std::rc::Rc;
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 05cd53a8a8e..d0047e743c3 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -59,7 +59,6 @@ use ptr::P;
 use parse::PResult;
 
 use std::collections::HashSet;
-use std::io::prelude::*;
 use std::mem;
 use std::path::{Path, PathBuf};
 use std::rc::Rc;
diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs
index 6e9c161293d..8e20358027b 100644
--- a/src/libsyntax/util/interner.rs
+++ b/src/libsyntax/util/interner.rs
@@ -115,14 +115,12 @@ impl Ord for RcStr {
 
 impl fmt::Debug for RcStr {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        use std::fmt::Debug;
         self[..].fmt(f)
     }
 }
 
 impl fmt::Display for RcStr {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        use std::fmt::Display;
         self[..].fmt(f)
     }
 }
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index e78fd0dea29..c6a70edf2a8 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -54,9 +54,7 @@ use self::TestEvent::*;
 use self::NamePadding::*;
 use self::OutputLocation::*;
 
-use stats::Stats;
 use std::boxed::FnBox;
-use term::Terminal;
 
 use std::any::Any;
 use std::cmp;