mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Auto merge of #32909 - sanxiyn:unused-trait-import-2, r=alexcrichton
Remove unused trait imports
This commit is contained in:
commit
054a4b4019
@ -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>,
|
||||
|
@ -14,7 +14,7 @@
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use char::CharExt;
|
||||
use cmp::{Eq, PartialOrd};
|
||||
use cmp::PartialOrd;
|
||||
use convert::From;
|
||||
use fmt;
|
||||
use intrinsics;
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
use session::config;
|
||||
use session::Session;
|
||||
use middle::cstore::CrateStore;
|
||||
use middle::lang_items;
|
||||
|
||||
use syntax::ast;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user