Merge branch 'macro-use' into HEAD

This commit is contained in:
Manish Goregaokar 2018-07-20 00:52:01 -07:00
commit 1f65617372
123 changed files with 189 additions and 20 deletions

View File

@ -21,8 +21,8 @@ edition = "2018"
[dependencies]
cargo_metadata = "0.5"
itertools = "0.7"
lazy_static = "1.0"
matches = "0.1.2"
lazy_static = "1.0.2"
matches = "0.1.7"
quine-mc_cluskey = "0.2.2"
regex-syntax = "0.6"
semver = "0.9.0"
@ -32,7 +32,7 @@ toml = "0.4"
unicode-normalization = "0.1"
pulldown-cmark = "0.1"
url = "1.7.0"
if_chain = "0.1"
if_chain = "0.1.3"
[features]
debugging = []

View File

@ -1,6 +1,7 @@
use crate::utils::span_lint;
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use std::f64::consts as f64;
use syntax::ast::{FloatTy, Lit, LitKind};
use syntax::symbol;

View File

@ -1,6 +1,7 @@
use crate::utils::span_lint;
use rustc::hir;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::codemap::Span;
/// **What it does:** Checks for plain integer arithmetic.

View File

@ -3,6 +3,8 @@ use crate::utils::{higher, sugg};
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

@ -7,6 +7,8 @@ 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,5 +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,4 +1,5 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use crate::utils::span_lint;

View File

@ -1,4 +1,6 @@
use matches::matches;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
use crate::utils::*;

View File

@ -1,4 +1,5 @@
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use rustc::hir::intravisit::*;
use syntax::ast::{LitKind, NodeId, DUMMY_NODE_ID};

View File

@ -1,5 +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

@ -13,6 +13,8 @@
//! This lint is **warn** by default
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,5 +1,6 @@
use syntax::ast::*;
use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
use rustc::{declare_lint, lint_array};
use crate::utils::{in_macro, snippet, span_lint_and_then};
/// **What it does:** Checks for constants with an explicit `'static` lifetime.

View File

@ -2,6 +2,7 @@
#![allow(float_cmp)]
use rustc::lint::LateContext;
use rustc::{span_bug, bug};
use rustc::hir::def::Def;
use rustc::hir::*;
use rustc::ty::{self, Ty, TyCtxt, Instance};

View File

@ -1,4 +1,5 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::ty::Ty;
use rustc::hir::*;
use std::collections::HashMap;

View File

@ -2,6 +2,7 @@
use rustc::cfg::CFG;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use rustc::ty;
use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};

View File

@ -1,5 +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,4 +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,6 +1,7 @@
use itertools::Itertools;
use pulldown_cmark;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast;
use syntax::codemap::{BytePos, Span};
use syntax_pos::Pos;

View File

@ -2,6 +2,7 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::codemap::Span;
use crate::utils::{snippet, span_lint_and_sugg, SpanlessEq};

View File

@ -1,5 +1,6 @@
use syntax::ast::*;
use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintContext, LintPass};
use rustc::{declare_lint, lint_array};
/// **What it does:** Checks for unnecessary double parentheses.
///

View File

@ -1,4 +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,5 +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

@ -1,6 +1,7 @@
//! lint on if expressions with an else if, but without a final else branch
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast::*;
use crate::utils::{in_external_macro, span_lint_and_sugg};

View File

@ -1,6 +1,7 @@
//! lint when there is an enum with no variants
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use crate::utils::span_lint_and_then;

View File

@ -1,6 +1,8 @@
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

@ -2,6 +2,7 @@
//! don't fit into an `i32`
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use rustc::ty;
use rustc::ty::subst::Substs;

View File

@ -3,6 +3,7 @@
use rustc::hir::*;
use rustc::hir::def::Def;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::{declare_lint, lint_array};
use syntax::ast::NodeId;
use syntax::codemap::Span;
use crate::utils::span_lint;

View File

@ -1,6 +1,7 @@
//! lint on enum variants that are prefixed or suffixed by the same characters
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast::*;
use syntax::codemap::Span;
use syntax::symbol::LocalInternedString;

View File

@ -1,5 +1,6 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use crate::utils::{in_macro, implements_trait, is_copy, multispan_sugg, snippet, span_lint, span_lint_and_then, SpanlessEq};
/// **What it does:** Checks for equal operands to comparison, logical and

View File

@ -1,6 +1,7 @@
use crate::consts::{constant_simple, Constant};
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::codemap::Span;
use crate::utils::{in_macro, span_lint};

View File

@ -2,6 +2,7 @@ use rustc::hir::*;
use rustc::hir::intravisit as visit;
use rustc::hir::map::Node::{NodeExpr, NodeStmt};
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::middle::expr_use_visitor::*;
use rustc::middle::mem_categorization::{cmt_, Categorization};
use rustc::ty::{self, Ty};

View File

@ -1,4 +1,5 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::ty;
use rustc::hir::*;
use crate::utils::{is_adjusted, iter_input_pats, snippet_opt, span_lint_and_then};

View File

@ -2,6 +2,8 @@ use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
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,5 +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,5 +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,4 +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,5 +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

@ -1,4 +1,5 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast;
use crate::utils::{differing_macro_contexts, in_macro, snippet_opt, span_note_and_lint};
use syntax::ptr::P;

View File

@ -1,6 +1,8 @@
use matches::matches;
use rustc::hir::intravisit;
use rustc::hir;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::ty;
use rustc::hir::def::Def;
use std::collections::HashSet;

View File

@ -1,4 +1,5 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use syntax::ast::NodeId;
use crate::utils::{in_macro, match_def_path, match_trait_method, same_tys, snippet, span_lint_and_then};

View File

@ -1,6 +1,7 @@
use crate::consts::{constant_simple, Constant};
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::codemap::Span;
use crate::utils::{in_macro, snippet, span_lint, unsext, clip};
use rustc::ty;

View File

@ -1,4 +1,5 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use crate::utils::{match_qpath, paths, snippet, span_lint_and_then};

View File

@ -2,6 +2,7 @@
//! on the condition
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast::*;
use crate::utils::{in_external_macro, span_help_and_lint};

View File

@ -6,6 +6,7 @@ use crate::utils::higher;
use crate::utils::higher::Range;
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::ty;
use syntax::ast::RangeLimits;

View File

@ -1,6 +1,8 @@
use super::utils::{get_arg_name, match_var, remove_blocks, snippet, span_lint_and_sugg};
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::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use crate::utils::{get_trait_def_id, higher, implements_trait, match_qpath, paths, span_lint};
/// **What it does:** Checks for iteration that is guaranteed to be infinite.

View File

@ -2,6 +2,7 @@
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use std::collections::HashMap;
use std::default::Default;
use syntax_pos::Span;

View File

@ -1,6 +1,7 @@
//! checks for `#[inline]` on trait methods without bodies
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use syntax::ast::{Attribute, Name};
use crate::utils::span_lint_and_then;

View File

@ -1,6 +1,7 @@
//! lint on blocks unnecessarily using >= with a + 1 or - 1
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast::*;
use crate::utils::{snippet_opt, span_lint_and_then};

View File

@ -1,4 +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,6 +1,8 @@
//! lint when items are used after statements
use matches::matches;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast::*;
use crate::utils::{in_macro, span_lint};

View File

@ -1,6 +1,7 @@
//! lint when there is a large size difference between variants on an enum
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use crate::utils::{snippet_opt, span_lint_and_then};
use rustc::ty::layout::LayoutOf;

View File

@ -1,6 +1,7 @@
use rustc::hir::def_id::DefId;
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::ty;
use std::collections::HashSet;
use syntax::ast::{Lit, LitKind, Name};

View File

@ -1,4 +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

@ -13,25 +13,10 @@
#![feature(macro_at_most_once_rep)]
#![feature(rust_2018_preview)]
#![warn(rust_2018_idioms)]
#![allow(macro_use_extern_crate)]
#[macro_use]
extern crate rustc;
use toml;
use rustc_plugin;
#[macro_use]
extern crate matches as matches_macro;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate if_chain;
macro_rules! declare_clippy_lint {
{ pub $name:tt, style, $description:tt } => {

View File

@ -1,5 +1,7 @@
use crate::reexport::*;
use matches::matches;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::def::Def;
use rustc::hir::*;
use rustc::hir::intravisit::*;

View File

@ -2,6 +2,8 @@
//! floating-point literal expressions.
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

@ -6,6 +6,8 @@ use rustc::hir::def_id;
use rustc::hir::intravisit::{walk_block, walk_decl, walk_expr, walk_pat, walk_stmt, NestedVisitorMap, Visitor};
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,4 +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,5 +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,5 +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

@ -1,4 +1,5 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::{Expr, ExprKind};
use crate::utils::{match_def_path, opt_def_id, paths, span_lint};

View File

@ -1,5 +1,8 @@
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

@ -2,6 +2,7 @@ use crate::consts::{constant_simple, Constant};
use crate::utils::{match_def_path, opt_def_id, paths, span_lint};
use rustc::hir::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use std::cmp::Ordering;
/// **What it does:** Checks for expressions where `std::cmp::min` and `max` are

View File

@ -1,7 +1,10 @@
use crate::reexport::*;
use matches::matches;
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,4 +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

@ -20,6 +20,7 @@
use rustc::hir;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::ty;
use syntax::ast;
use syntax::attr;

View File

@ -11,6 +11,7 @@
use rustc::hir;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast;
use syntax::codemap::Span;

View File

@ -1,6 +1,7 @@
//! lint on multiple versions of a crate being used
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast::*;
use cargo_metadata;

View File

@ -1,6 +1,7 @@
use rustc::hir;
use rustc::hir::intravisit;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::ty;
use crate::utils::{higher, in_external_macro, span_lint};

View File

@ -1,4 +1,5 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::ty::{self, Ty};
use rustc::ty::subst::Subst;
use rustc::hir::*;

View File

@ -3,6 +3,7 @@
//! This lint is **warn** by default
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::{declare_lint, lint_array};
use rustc::ty::{self, Ty};
use rustc::hir::Expr;
use syntax::ast;

View File

@ -3,6 +3,7 @@
//! This lint is **warn** by default
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use syntax::ast::LitKind;
use syntax::codemap::Spanned;

View File

@ -3,6 +3,8 @@
//! This lint is **warn** by default
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

@ -3,6 +3,8 @@
//! This lint is **warn** by default
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

@ -28,6 +28,7 @@
//!
//! This lint is **warn** by default.
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast;
use syntax::codemap::{original_sp, DUMMY_SP};
use std::borrow::Cow;

View File

@ -1,7 +1,10 @@
use matches::matches;
use rustc::hir::*;
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,4 +1,5 @@
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::{declare_lint, lint_array};
use rustc::ty;
use rustc::hir::{Expr, ExprKind};
use crate::utils::span_lint;

View File

@ -1,5 +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,5 +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

@ -1,6 +1,8 @@
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,4 +1,5 @@
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::{declare_lint, lint_array};
use rustc::hir::def::Def;
use rustc::hir::{BinOpKind, BlockCheckMode, Expr, ExprKind, Stmt, StmtKind, UnsafeSource};
use crate::utils::{has_drop, in_macro, snippet_opt, span_lint, span_lint_and_sugg};

View File

@ -3,6 +3,7 @@
//! This lint is **deny** by default.
use rustc::lint::{LateContext, LateLintPass, Lint, LintArray, LintPass};
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use rustc::hir::def::Def;
use rustc::ty::{self, TypeFlags};

View File

@ -1,4 +1,5 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::codemap::Span;
use syntax::symbol::LocalInternedString;
use syntax::ast::*;

View File

@ -1,4 +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::hir::{Expr, ExprKind};
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast::LitKind;
use syntax::codemap::{Span, Spanned};
use crate::utils::{match_type, paths, span_lint, walk_ptrs_ty};

View File

@ -1,4 +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,5 +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,4 +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

@ -1,4 +1,5 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast::*;
use syntax::codemap::Spanned;
use crate::utils::{in_macro, snippet, span_lint_and_sugg};

View File

@ -5,6 +5,8 @@ use rustc::hir::*;
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,4 +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,4 +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,4 +1,5 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use crate::utils::{in_macro, is_range_expression, match_var, span_lint_and_sugg};

View File

@ -1,5 +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

@ -1,6 +1,8 @@
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,4 +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,4 +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,4 +1,5 @@
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use crate::utils::{get_trait_def_id, paths, span_lint};

View File

@ -1,5 +1,6 @@
use crate::reexport::*;
use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use rustc::hir::intravisit::FnKind;
use rustc::ty;

Some files were not shown because too many files have changed in this diff Show More