]> git.lizzy.rs Git - rust.git/commitdiff
Remove unused trait imports
authorSeo Sanghyeon <sanxiyn@gmail.com>
Tue, 12 Apr 2016 13:58:55 +0000 (22:58 +0900)
committerSeo Sanghyeon <sanxiyn@gmail.com>
Tue, 12 Apr 2016 13:58:55 +0000 (22:58 +0900)
28 files changed:
src/libcore/fmt/builders.rs
src/libcore/num/mod.rs
src/libcore/option.rs
src/libcore/slice.rs
src/libcore/str/mod.rs
src/librustc/infer/combine.rs
src/librustc/infer/error_reporting.rs
src/librustc/infer/mod.rs
src/librustc/lint/context.rs
src/librustc/middle/dead.rs
src/librustc/middle/dependency_format.rs
src/librustc/middle/lang_items.rs
src/librustc/middle/stability.rs
src/librustc/middle/weak_lang_items.rs
src/librustc/session/config.rs
src/librustc/session/filesearch.rs
src/librustc/traits/specialize/mod.rs
src/librustc/traits/specialize/specialization_graph.rs
src/librustc/ty/context.rs
src/librustc/ty/mod.rs
src/librustc/ty/trait_def.rs
src/librustc/ty/util.rs
src/libstd/sys/unix/fs.rs
src/libsyntax/errors/mod.rs
src/libsyntax/parse/mod.rs
src/libsyntax/parse/parser.rs
src/libsyntax/util/interner.rs
src/libtest/lib.rs

index d33746389a0a0a6081fdf791b5b4265f5940cb27..6cac80ab6245f8bf421ce5be8c7c2c514042aed6 100644 (file)
@@ -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>,
index 9af8ef53851db986bc48556ebe74f3fa8c40eda7..f0bbe9672ab8cd207857336748d567d48d1d33b4 100644 (file)
@@ -14,7 +14,7 @@
 #![allow(missing_docs)]
 
 use char::CharExt;
-use cmp::{Eq, PartialOrd};
+use cmp::PartialOrd;
 use convert::From;
 use fmt;
 use intrinsics;
index beed2075d049427d2daa39365d0e1730ee901f58..045c1f9feafc605d12a8e727e05f613dfa0873c1 100644 (file)
 use self::Option::*;
 
 use clone::Clone;
-use cmp::{Eq, Ord};
 use default::Default;
 use iter::ExactSizeIterator;
 use iter::{Iterator, DoubleEndedIterator, FromIterator, IntoIterator};
index f21af7d917e20ef15a2eac06972c00a9bc069d2e..b105301e0854e402e6de41de74ff469e5213ed45 100644 (file)
@@ -41,7 +41,7 @@
 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};
index f1be10da872411e80e6ffead263c559e91e89696..e5c5fe6e05cafaa7a726d31458a5bc9014b0fc22 100644 (file)
@@ -19,7 +19,6 @@
 
 use char::{self, CharExt};
 use clone::Clone;
-use cmp::Eq;
 use convert::AsRef;
 use default::Default;
 use fmt;
@@ -1320,7 +1319,6 @@ pub struct CharRange {
 
 mod traits {
     use cmp::{Ord, Ordering, PartialEq, PartialOrd, Eq};
-    use iter::Iterator;
     use option::Option;
     use option::Option::Some;
     use ops;
index 67669c54ac5eb047ffdd1322df97c638173e71e6..2a27da06612b068ed88e0ec4efa53b0252c0c32d 100644 (file)
@@ -44,8 +44,8 @@
 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;
index a7553f4eb1f1cbed2a7dec545052f411789eb365..bcf854009e5de214d1addc849e55b55e1a11e85e 100644 (file)
@@ -77,7 +77,6 @@
 use hir;
 use hir::print as pprust;
 
-use middle::cstore::CrateStore;
 use hir::def::Def;
 use hir::def_id::DefId;
 use infer::{self, TypeOrigin};
index 4c1216aa8626ad406c711edf37e4b50befac0b6e..96acb708315e433db1b4ad7406e5b07125b9ab92 100644 (file)
@@ -31,7 +31,7 @@
 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};
index 1c6dd2658897a60302f4ba124bf0cddc0e77d2aa..684cfbea3f5daef8bb2eaaa6caed93384b091ef5 100644 (file)
@@ -30,7 +30,7 @@
 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;
index dcdc02c9df6097d62f26c935da6f4552fd7ad586..576a9bb33e8bfffd6a1a873bf2cbad9f6852308c 100644 (file)
@@ -25,7 +25,7 @@
 
 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
index aac6f1edc051da6fe085ebf06848cc85fd2581c0..c2498b7b5eed3114de255a966ed3899e0310e714 100644 (file)
@@ -65,7 +65,6 @@
 
 use session;
 use session::config;
-use middle::cstore::CrateStore;
 use middle::cstore::LinkagePreference::{self, RequireStatic, RequireDynamic};
 use util::nodemap::FnvHashMap;
 
index 86531ced8dfae41e1f174074ef3682c9e97d7bc2..346532e2f5d80d98f9498d994563c4d5f9ce5853 100644 (file)
@@ -24,7 +24,6 @@
 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;
index 6c7c7f160f4e5b5ea9d254c57dcb3fdcdd0ce7de..5962142ca4a4b2045b13d4e70f2a76db9bad21b5 100644 (file)
@@ -17,7 +17,7 @@
 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};
index 74bb41785cbe143446c0975bb0ceaa404c9e9fe5..5fe6076e5380e16b1af7e969fe74e6aaad60ec34 100644 (file)
@@ -12,7 +12,6 @@
 
 use session::config;
 use session::Session;
-use middle::cstore::CrateStore;
 use middle::lang_items;
 
 use syntax::ast;
index 574c927bd75d2cca969fbe58db01866c46cd0896..67fb116bcd526fc249a93b2a1080f24a156e4c87 100644 (file)
@@ -28,7 +28,6 @@
 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;
 
index e54acf3fdc3078f9f004686d0faa4d08b0676863..a3eea324fd820418fe188f7790d38974da42d2be 100644 (file)
@@ -15,7 +15,6 @@
 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};
index 63647515a9785ad19257039b12c79ca1abb2e6fd..e78a490bc4cc16395f1433fa4f81e88cee9bad99 100644 (file)
@@ -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;
index 3c65e368db5facd4853f3d90ae5678eda53963fe..7508f1234778f75daffe595cf09778651e782f66 100644 (file)
@@ -13,7 +13,6 @@
 
 use super::{Overlap, specializes};
 
-use middle::cstore::CrateStore;
 use hir::def_id::DefId;
 use infer;
 use traits::{self, ProjectionMode};
index bdba700f49ad52cdafee8b22dd120ae59f61ec93..61c49475ac4cd556119efeecfcb71568e8bedb92 100644 (file)
@@ -15,7 +15,7 @@
 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;
index cba3a9e2ebb5ccfadf418572c2a398ae25e9def7..08617e729b5d8e49fbcdf6087ed999f4ecb07b47 100644 (file)
 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::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;
index 39a3837ae7f35ad0110933838c42a6cf1d4937ca..faae95e711699128d02be1253514b44739da3797 100644 (file)
@@ -14,7 +14,6 @@
 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;
index 354744b27875dbc2eb55380959bc3d216e33a411..d4bd448fca2a2a4ccb57dc9bb79e41b29a69073a 100644 (file)
@@ -25,7 +25,7 @@
 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;
index 810a34478c5f90fc7ba11d0582a1dd38c7cc9501..d5d17e7ee1201ce382f914ea52e48f874e064e3e 100644 (file)
@@ -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};
index c8c12d5a883344b32cb999d66122c314cbb4957d..acf65fe15b154c203c6fe1fa797e7f80ce9122e0 100644 (file)
@@ -19,7 +19,6 @@
 
 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)
     }
 }
index ea5d6739e6dd3db8561699ebbc13d908dadb098e..29b1d5b9aff0631159027de605e0bc1170e1b1f8 100644 (file)
@@ -19,7 +19,6 @@
 use str::char_at;
 
 use std::cell::RefCell;
-use std::io::Read;
 use std::iter;
 use std::path::{Path, PathBuf};
 use std::rc::Rc;
index b8c926f8de9cb7b693025153067bc6d8a94ffc49..c7d6b5c057b2f0ed498d50357a2ab1ad8e72276a 100644 (file)
@@ -59,7 +59,6 @@
 use parse::PResult;
 
 use std::collections::HashSet;
-use std::io::prelude::*;
 use std::mem;
 use std::path::{Path, PathBuf};
 use std::rc::Rc;
index 6e9c161293de27359ef5fb91e3a79ff1f93242e2..8e20358027b228c2b28bfaa751ac0536d9806608 100644 (file)
@@ -115,14 +115,12 @@ fn cmp(&self, other: &RcStr) -> Ordering {
 
 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)
     }
 }
index e78fd0dea292ad4f478218d91a75cca8ea730d63..c6a70edf2a8f222280ab5fcb2217513c48e7d929 100644 (file)
@@ -54,9 +54,7 @@
 use self::NamePadding::*;
 use self::OutputLocation::*;
 
-use stats::Stats;
 use std::boxed::FnBox;
-use term::Terminal;
 
 use std::any::Any;
 use std::cmp;