mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
Remove import of if_chain
This commit is contained in:
parent
c7676356b8
commit
5918a3fc1e
@ -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
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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,
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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 }
|
||||
|
@ -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};
|
||||
|
@ -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::*;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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::*;
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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::*;
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user