Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused trait imports #32909

Merged
merged 1 commit into from
Apr 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libcore/fmt/builders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#![allow(missing_docs)]

use char::CharExt;
use cmp::{Eq, PartialOrd};
use cmp::PartialOrd;
use convert::From;
use fmt;
use intrinsics;
Expand Down
1 change: 0 additions & 1 deletion src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 0 additions & 2 deletions src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1320,7 +1319,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;
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/infer/combine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/infer/error_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/lint/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/dead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/dependency_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/lang_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/weak_lang_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

use session::config;
use session::Session;
use middle::cstore::CrateStore;
use middle::lang_items;

use syntax::ast;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion src/librustc/session/filesearch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 0 additions & 1 deletion src/librustc/traits/specialize/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/traits/specialize/specialization_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions src/librustc/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,21 @@ 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;
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;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/ty/trait_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/libstd/sys/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
3 changes: 0 additions & 3 deletions src/libsyntax/errors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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)
}
}
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax/parse/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/libsyntax/util/interner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/libtest/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down