Remove unused trait imports flagged by lint
This commit is contained in:
parent
7d8100a068
commit
7ad1900e1c
@ -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)]
|
||||
|
@ -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() {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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() {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -13,7 +13,6 @@
|
||||
// substitutions.
|
||||
use self::ResolveReason::*;
|
||||
|
||||
use astconv::AstConv;
|
||||
use check::FnCtxt;
|
||||
use hir::def_id::DefId;
|
||||
use hir::pat_util;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -9,7 +9,6 @@
|
||||
// except according to those terms.
|
||||
|
||||
use std::fmt;
|
||||
use std::io::prelude::*;
|
||||
use std::io;
|
||||
|
||||
use externalfiles::ExternalHtml;
|
||||
|
@ -11,7 +11,6 @@
|
||||
#![cfg(test)]
|
||||
|
||||
extern crate test;
|
||||
use prelude::v1::*;
|
||||
|
||||
use self::test::Bencher;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user