Skip to content

Commit

Permalink
Rollup merge of rust-lang#68815 - matthiaskrgr:redundant_imports, r=a…
Browse files Browse the repository at this point in the history
…lexcrichton

remove redundant imports (clippy::single_component_path_imports)
  • Loading branch information
Dylan-DPC authored Feb 4, 2020
2 parents 94d6a96 + 697ef95 commit 3fe4c0d
Show file tree
Hide file tree
Showing 24 changed files with 0 additions and 36 deletions.
1 change: 0 additions & 1 deletion src/librustc/traits/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ use crate::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
use crate::ty::subst::{InternalSubsts, SubstsRef};
use crate::ty::{self, AdtKind, GenericParamDefKind, List, ToPredicate, Ty, TyCtxt, WithConstness};
use crate::util::common::ErrorReported;
use chalk_engine;
use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_macros::HashStable;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/traits/structural_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::traits;
use crate::traits::project::Normalized;
use crate::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
use crate::ty::{self, Lift, Ty, TyCtxt};
use chalk_engine;
use rustc_span::symbol::Symbol;
use smallvec::SmallVec;

Expand Down
1 change: 0 additions & 1 deletion src/librustc/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ use rustc_target::abi::Align;
use syntax::ast::{self, Constness, Ident, Name};
use syntax::node_id::{NodeId, NodeMap, NodeSet};

use smallvec;
use std::cell::RefCell;
use std::cmp::{self, Ordering};
use std::fmt;
Expand Down
1 change: 0 additions & 1 deletion src/librustc_builtin_macros/log_syntax.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use rustc_ast_pretty::pprust;
use rustc_expand::base;
use rustc_span;
use syntax::tokenstream::TokenStream;

pub fn expand_log_syntax<'cx>(
Expand Down
1 change: 0 additions & 1 deletion src/librustc_interface/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use rustc::ty::tls;
use rustc_errors::{Diagnostic, TRACK_DIAGNOSTICS};
use rustc_span;
use std::fmt;

/// This is a callback from libsyntax as it cannot access the implicit state
Expand Down
4 changes: 0 additions & 4 deletions src/librustc_interface/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use rustc::traits;
use rustc::ty::steal::Steal;
use rustc::ty::{self, GlobalCtxt, ResolverOutputs, TyCtxt};
use rustc::util::common::ErrorReported;
use rustc_builtin_macros;
use rustc_codegen_ssa::back::link::emit_metadata;
use rustc_codegen_utils::codegen_backend::CodegenBackend;
use rustc_codegen_utils::link::filename_for_metadata;
Expand All @@ -26,18 +25,15 @@ use rustc_data_structures::{box_region_allow_access, declare_box_region_type, pa
use rustc_errors::PResult;
use rustc_expand::base::ExtCtxt;
use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};
use rustc_incremental;
use rustc_lint::LintStore;
use rustc_mir as mir;
use rustc_mir_build as mir_build;
use rustc_parse::{parse_crate_from_file, parse_crate_from_source_str};
use rustc_passes::{self, hir_stats, layout_test};
use rustc_plugin_impl as plugin;
use rustc_privacy;
use rustc_resolve::{Resolver, ResolverArenas};
use rustc_span::symbol::Symbol;
use rustc_span::FileName;
use rustc_traits;
use rustc_typeck as typeck;
use syntax::mut_visit::MutVisitor;
use syntax::{self, ast, visit};
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_macros/src/lift.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use proc_macro2;
use quote::quote;
use syn::{self, parse_quote};
use synstructure;

pub fn lift_derive(mut s: synstructure::Structure<'_>) -> proc_macro2::TokenStream {
s.add_bounds(synstructure::AddBounds::Generics);
Expand Down
1 change: 0 additions & 1 deletion src/librustc_macros/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use itertools::Itertools;
use proc_macro::TokenStream;
use proc_macro2::{Delimiter, TokenTree};
use quote::quote;
use syn;
use syn::parse::{Parse, ParseStream, Result};
use syn::punctuated::Punctuated;
use syn::spanned::Spanned;
Expand Down
1 change: 0 additions & 1 deletion src/librustc_macros/src/symbols.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use proc_macro::TokenStream;
use quote::quote;
use std::collections::HashSet;
use syn;
use syn::parse::{Parse, ParseStream, Result};
use syn::{braced, parse_macro_input, Ident, LitStr, Token};

Expand Down
2 changes: 0 additions & 2 deletions src/librustc_macros/src/type_foldable.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use quote::quote;
use syn;
use synstructure;

pub fn type_foldable_derive(mut s: synstructure::Structure<'_>) -> proc_macro2::TokenStream {
if let syn::Data::Union(_) = s.ast().data {
Expand Down
1 change: 0 additions & 1 deletion src/librustc_passes/dead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use rustc_hir::itemlikevisit::ItemLikeVisitor;
use rustc_hir::{Node, PatKind, TyKind};
use rustc_session::lint;

use rustc_span;
use rustc_span::symbol::sym;
use syntax::{ast, attr};

Expand Down
4 changes: 0 additions & 4 deletions src/librustc_session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ use rustc_span::symbol::{sym, Symbol};
use rustc_errors::emitter::HumanReadableErrorType;
use rustc_errors::{ColorConfig, FatalError, Handler, HandlerFlags};

use getopts;

use std::collections::btree_map::{
Iter as BTreeMapIter, Keys as BTreeMapKeysIter, Values as BTreeMapValuesIter,
};
Expand Down Expand Up @@ -816,7 +814,6 @@ mod opt {
#![allow(dead_code)]

use super::RustcOptGroup;
use getopts;

pub type R = RustcOptGroup;
pub type S = &'static str;
Expand Down Expand Up @@ -1862,7 +1859,6 @@ pub fn parse_crate_types_from_list(list_list: Vec<String>) -> Result<Vec<CrateTy
pub mod nightly_options {
use super::{ErrorOutputType, OptionStability, RustcOptGroup};
use crate::early_error;
use getopts;
use rustc_feature::UnstableFeatures;

pub fn is_unstable_enabled(matches: &getopts::Matches) -> bool {
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_session/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use rustc_target::spec::{LinkerFlavor, MergeFunctions, PanicStrategy, RelroLevel
use rustc_feature::UnstableFeatures;
use rustc_span::edition::Edition;

use getopts;

use std::collections::BTreeMap;

use std::collections::hash_map::DefaultHasher;
Expand Down
1 change: 0 additions & 1 deletion src/librustc_session/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ use rustc_data_structures::jobserver::{self, Client};
use rustc_data_structures::profiling::{SelfProfiler, SelfProfilerRef};
use rustc_target::spec::{PanicStrategy, RelroLevel, Target, TargetTriple};

use std;
use std::cell::{self, RefCell};
use std::env;
use std::fmt;
Expand Down
1 change: 0 additions & 1 deletion src/librustc_typeck/variance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//!
//! [rustc guide]: https://rust-lang.github.io/rustc-guide/variance.html
use arena;
use hir::Node;
use rustc::ty::query::Providers;
use rustc::ty::{self, CrateVariancesMap, TyCtxt};
Expand Down
1 change: 0 additions & 1 deletion src/librustdoc/clean/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use rustc_data_structures::fx::FxHashSet;
use rustc_hir as hir;
use rustc_hir::def::{DefKind, Res};
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
use rustc_span;
use rustc_span::symbol::{kw, sym, Symbol};
use std::mem;

Expand Down
2 changes: 0 additions & 2 deletions src/librustdoc/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use std::ffi::OsStr;
use std::fmt;
use std::path::PathBuf;

use getopts;
use rustc::lint::Level;
use rustc::session;
use rustc::session::config::{
Expand All @@ -13,7 +12,6 @@ use rustc::session::config::{
use rustc::session::config::{parse_crate_types_from_list, parse_externs, CrateType};
use rustc::session::config::{CodegenOptions, DebuggingOptions, ErrorOutputType, Externs};
use rustc::session::search_paths::SearchPath;
use rustc_driver;
use rustc_span::edition::{Edition, DEFAULT_EDITION};
use rustc_target::spec::TargetTriple;

Expand Down
1 change: 0 additions & 1 deletion src/librustdoc/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use rustc_hir::def::Namespace::TypeNS;
use rustc_hir::def_id::{CrateNum, DefId, DefIndex, LOCAL_CRATE};
use rustc_hir::HirId;
use rustc_interface::interface;
use rustc_lint;
use rustc_resolve as resolve;
use rustc_session::lint;

Expand Down
2 changes: 0 additions & 2 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ use crate::html::markdown::{self, ErrorCodes, IdMap, Markdown, MarkdownHtml, Mar
use crate::html::sources;
use crate::html::{highlight, layout, static_files};

use minifier;

#[cfg(test)]
mod tests;

Expand Down
1 change: 0 additions & 1 deletion src/librustdoc/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use std::path::PathBuf;
use rustc_feature::UnstableFeatures;
use rustc_span::edition::Edition;
use rustc_span::source_map::DUMMY_SP;
use testing;

use crate::config::{Options, RenderOptions};
use crate::externalfiles::{load_string, LoadStringError};
Expand Down
1 change: 0 additions & 1 deletion src/librustdoc/passes/collect_intra_doc_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use rustc_hir::def_id::DefId;
use rustc_resolve::ParentScope;
use rustc_span::symbol::Symbol;
use rustc_span::DUMMY_SP;
use syntax;
use syntax::ast::{self, Ident};

use std::ops::Range;
Expand Down
1 change: 0 additions & 1 deletion src/librustdoc/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use std::str;
use syntax::ast;
use syntax::with_globals;
use tempfile::Builder as TempFileBuilder;
use testing;

use crate::clean::Attributes;
use crate::config::Options;
Expand Down
1 change: 0 additions & 1 deletion src/libtest/cli.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Module converting command-line arguments into test configuration.
use getopts;
use std::env;
use std::path::PathBuf;

Expand Down
2 changes: 0 additions & 2 deletions src/libtest/console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ use std::fs::File;
use std::io;
use std::io::prelude::Write;

use term;

use super::{
bench::fmt_bench_samples,
cli::TestOpts,
Expand Down

0 comments on commit 3fe4c0d

Please sign in to comment.