Remove import of if_chain

This commit is contained in:
Manish Goregaokar 2018-07-19 01:00:54 -07:00
parent c7676356b8
commit 5918a3fc1e
56 changed files with 55 additions and 3 deletions

View File

@ -4,6 +4,7 @@ use rustc::hir;
use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use syntax::ast;
/// **What it does:** Checks for compound assignment operations (`+=` and

View File

@ -8,6 +8,7 @@ use crate::utils::{
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty::{self, TyCtxt};
use semver::Version;
use syntax::ast::{AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem, NestedMetaItemKind};

View File

@ -1,6 +1,7 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use syntax::ast::LitKind;
use syntax::codemap::Span;
use crate::utils::{span_lint, span_lint_and_then};

View File

@ -1,6 +1,7 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty;
use syntax::ast::{Name, UintTy};
use crate::utils::{contains_name, get_pat_name, match_type, paths, single_segment_path, snippet, span_lint_and_sugg,

View File

@ -14,6 +14,7 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use syntax::ast;
use crate::utils::{in_macro, snippet_block, span_lint_and_sugg, span_lint_and_then};

View File

@ -1,6 +1,7 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty::TypeVariants;
use crate::utils::{any_parent_is_automatically_derived, match_def_path, opt_def_id, paths, span_lint_and_sugg};

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty::{self, Ty};
use rustc::hir::*;
use syntax::codemap::Span;

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty;
use rustc::hir::*;
use crate::utils::{is_copy, match_def_path, opt_def_id, paths, span_note_and_lint};

View File

@ -1,6 +1,7 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use syntax::codemap::Spanned;
use crate::consts::{constant, Constant};

View File

@ -2,6 +2,7 @@ use rustc::hir::*;
use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use syntax::codemap::Span;
use crate::utils::SpanlessEq;
use crate::utils::{get_item_name, match_type, paths, snippet, span_lint_and_then, walk_ptrs_ty};

View File

@ -3,6 +3,7 @@ use rustc::hir::*;
use rustc::ty;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use syntax::ast;
use crate::utils::{get_parent_expr, span_lint, span_note_and_lint};

View File

@ -1,6 +1,7 @@
use rustc::hir;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty::TypeVariants;
use std::f32;
use std::f64;

View File

@ -1,6 +1,7 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use crate::utils::{is_expn_of, match_def_path, resolve_node, span_lint};
use crate::utils::opt_def_id;

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir;
use rustc::ty;
use syntax_pos::Span;

View File

@ -1,6 +1,7 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty;
use syntax::ast::LitKind;
use syntax_pos::Span;

View File

@ -2,6 +2,7 @@ use super::utils::{get_arg_name, match_var, remove_blocks, snippet, span_lint_an
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
/// **What it does:** Checks for matches being used to destructure a single-variant enum
/// or tuple struct where a `let` will suffice.

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty;
use rustc::hir::*;
use crate::utils::{match_def_path, opt_def_id, paths, span_help_and_lint};

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir;
use rustc::hir::BindingAnnotation;
use rustc::hir::def::Def;

View File

@ -19,9 +19,6 @@ use toml;
use rustc_plugin;
#[macro_use]
extern crate if_chain;
macro_rules! declare_clippy_lint {
{ pub $name:tt, style, $description:tt } => {
declare_lint! { pub $name, Warn, $description }

View File

@ -3,6 +3,7 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use syntax::ast::*;
use syntax_pos;
use crate::utils::{in_external_macro, snippet_opt, span_lint_and_sugg};

View File

@ -7,6 +7,7 @@ use rustc::hir::intravisit::{walk_block, walk_decl, walk_expr, walk_pat, walk_st
use rustc::hir::map::Node::{NodeBlock, NodeExpr, NodeStmt};
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::middle::region;
// use rustc::middle::region::CodeExtent;
use rustc::middle::expr_use_visitor::*;

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir::*;
use rustc::ty;
use syntax::ast;

View File

@ -1,6 +1,7 @@
use rustc::hir;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty;
use rustc_errors::Applicability;
use syntax::codemap::Span;

View File

@ -1,6 +1,7 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty::{self, Ty};
use std::cmp::Ordering;
use std::collections::Bound;

View File

@ -2,6 +2,7 @@ use matches::matches;
use rustc::hir;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty::{self, Ty};
use rustc::hir::def::Def;
use std::borrow::Cow;

View File

@ -4,6 +4,7 @@ use rustc::hir::*;
use rustc::hir::intravisit::FnKind;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty;
use syntax::codemap::{ExpnFormat, Span};
use crate::utils::{get_item_name, get_parent_expr, implements_trait, in_constant, in_macro, is_integer_literal,

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use std::collections::HashMap;
use std::char;
use syntax::ast::*;

View File

@ -4,6 +4,7 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir::{BindingAnnotation, Expr, ExprKind, MutImmutable, Pat, PatKind};
use rustc::ty;
use rustc::ty::adjustment::{Adjust, Adjustment};

View File

@ -4,6 +4,7 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir::{BindingAnnotation, MutImmutable, Pat, PatKind};
use crate::utils::{in_macro, snippet, span_lint_and_then};

View File

@ -4,6 +4,7 @@ use rustc::hir::map::*;
use rustc::hir::intravisit::FnKind;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty::{self, RegionKind, TypeFoldable};
use rustc::traits;
use rustc::middle::expr_use_visitor as euv;

View File

@ -1,6 +1,7 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use crate::utils::{self, paths, span_lint, in_external_macro};

View File

@ -1,6 +1,7 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use syntax::codemap::{Span, Spanned};
use crate::consts::{self, Constant};

View File

@ -2,6 +2,7 @@ use rustc::hir::def_id::DefId;
use rustc::hir;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty::{self, Ty};
use syntax::codemap::Span;
use crate::utils::paths;

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir::*;
use crate::utils::{match_type, method_chain_args, paths, snippet, span_help_and_lint};

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir::*;
use crate::utils::{span_lint, SpanlessEq};

View File

@ -1,6 +1,7 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use syntax::ast::LitKind;
use syntax::ptr::P;
use syntax::ext::quote::rt::Span;

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir::*;
use crate::utils::{is_automatically_derived, span_lint};

View File

@ -6,6 +6,7 @@ use rustc::hir::map::NodeItem;
use rustc::hir::QPath;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty;
use syntax::ast::NodeId;
use syntax::codemap::Span;

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir::*;
use rustc::hir::def::Def;
use crate::utils::sugg::Sugg;

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir::*;
use syntax::ast::RangeLimits;
use syntax::codemap::Spanned;

View File

@ -1,6 +1,7 @@
use syntax::ast::{Expr, ExprKind, UnOp};
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use crate::utils::{snippet, span_lint_and_sugg};
/// **What it does:** Checks for usage of `*&` and `*&mut` in expressions.

View File

@ -2,6 +2,7 @@ use regex_syntax;
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use std::collections::HashSet;
use syntax::ast::{LitKind, NodeId, StrStyle};
use syntax::codemap::{BytePos, Span};

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir;
use rustc::hir::def::Def;
use crate::utils::{match_def_path, span_lint_and_sugg};

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use syntax::ast;
use syntax::codemap::Span;
use syntax::visit::FnKind;

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir;
use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
use syntax::ast;

View File

@ -2,6 +2,7 @@ use matches::matches;
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty;
use crate::utils::{differing_macro_contexts, match_type, paths, snippet, span_lint_and_then, walk_ptrs_ty, SpanlessEq};
use crate::utils::sugg::Sugg;

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty::{self, Ty};
use rustc::hir::*;
use std::borrow::Cow;

View File

@ -6,6 +6,7 @@ use rustc::hir::map::*;
use rustc::hir::intravisit::FnKind;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty::TypeVariants;
use rustc::session::config::Config as SessionConfig;
use rustc_target::spec::abi::Abi;

View File

@ -4,6 +4,7 @@ use rustc::hir::*;
use rustc::hir::intravisit::{walk_body, walk_expr, walk_ty, FnKind, NestedVisitorMap, Visitor};
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty::{self, Ty, TyCtxt, TypeckTables};
use rustc::ty::layout::LayoutOf;
use rustc_typeck::hir_ty_to_ty;

View File

@ -1,5 +1,6 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use crate::utils::{in_macro, match_type, paths, span_lint_and_then, usage::is_potentially_mutated};
use rustc::hir::intravisit::*;

View File

@ -1,5 +1,6 @@
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir::*;
use rustc::hir::intravisit::{walk_path, NestedVisitorMap, Visitor};
use crate::utils::{in_macro, span_lint_and_then};

View File

@ -3,6 +3,7 @@
#![deny(missing_docs_in_private_items)]
use if_chain::if_chain;
use rustc::{hir, ty};
use rustc::lint::LateContext;
use syntax::ast;

View File

@ -1,5 +1,6 @@
use crate::reexport::*;
use matches::matches;
use if_chain::if_chain;
use rustc::hir;
use rustc::hir::*;
use rustc::hir::def_id::{DefId, CRATE_DEF_INDEX};

View File

@ -1,6 +1,7 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::ty::{self, Ty};
use syntax::codemap::Span;
use crate::utils::{higher, is_copy, snippet, span_lint_and_sugg};

View File

@ -2,6 +2,7 @@ use rustc::hir::map::Node::{NodeImplItem, NodeItem};
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use std::ops::Deref;
use syntax::ast::LitKind;
use syntax::ptr;

View File

@ -1,6 +1,7 @@
use crate::consts::{constant_simple, Constant};
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use if_chain::if_chain;
use rustc::hir::*;
use crate::utils::span_help_and_lint;