Remove import of rustc

This commit is contained in:
Manish Goregaokar 2018-07-19 00:53:23 -07:00
parent 00ba67a12b
commit 5d74e2096b
118 changed files with 117 additions and 3 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,7 @@
use itertools::Itertools; use itertools::Itertools;
use pulldown_cmark; use pulldown_cmark;
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast; use syntax::ast;
use syntax::codemap::{BytePos, Span}; use syntax::codemap::{BytePos, Span};
use syntax_pos::Pos; use syntax_pos::Pos;

View file

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

View file

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

View file

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

View file

@ -1,5 +1,6 @@
use rustc::hir::*; use rustc::hir::*;
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::codemap::Spanned; use syntax::codemap::Spanned;
use crate::consts::{constant, Constant}; 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 //! lint on if expressions with an else if, but without a final else branch
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast::*; use syntax::ast::*;
use crate::utils::{in_external_macro, span_lint_and_sugg}; 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 //! lint when there is an enum with no variants
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*; use rustc::hir::*;
use crate::utils::span_lint_and_then; use crate::utils::span_lint_and_then;

View file

@ -1,6 +1,7 @@
use rustc::hir::*; use rustc::hir::*;
use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor}; use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::codemap::Span; use syntax::codemap::Span;
use crate::utils::SpanlessEq; use crate::utils::SpanlessEq;
use crate::utils::{get_item_name, match_type, paths, snippet, span_lint_and_then, walk_ptrs_ty}; 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` //! don't fit into an `i32`
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*; use rustc::hir::*;
use rustc::ty; use rustc::ty;
use rustc::ty::subst::Substs; use rustc::ty::subst::Substs;

View file

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

View file

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

View file

@ -1,5 +1,6 @@
use rustc::hir::*; use rustc::hir::*;
use rustc::lint::*; 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}; 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 /// **What it does:** Checks for equal operands to comparison, logical and

View file

@ -1,6 +1,7 @@
use crate::consts::{constant_simple, Constant}; use crate::consts::{constant_simple, Constant};
use rustc::hir::*; use rustc::hir::*;
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::codemap::Span; use syntax::codemap::Span;
use crate::utils::{in_macro, span_lint}; 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::intravisit as visit;
use rustc::hir::map::Node::{NodeExpr, NodeStmt}; use rustc::hir::map::Node::{NodeExpr, NodeStmt};
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::middle::expr_use_visitor::*; use rustc::middle::expr_use_visitor::*;
use rustc::middle::mem_categorization::{cmt_, Categorization}; use rustc::middle::mem_categorization::{cmt_, Categorization};
use rustc::ty::{self, Ty}; use rustc::ty::{self, Ty};

View file

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

View file

@ -2,6 +2,7 @@ use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
use rustc::hir::*; use rustc::hir::*;
use rustc::ty; use rustc::ty;
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast; use syntax::ast;
use crate::utils::{get_parent_expr, span_lint, span_note_and_lint}; use crate::utils::{get_parent_expr, span_lint, span_note_and_lint};

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,5 @@
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*; use rustc::hir::*;
use syntax::ast::NodeId; use syntax::ast::NodeId;
use crate::utils::{in_macro, match_def_path, match_trait_method, same_tys, snippet, span_lint_and_then}; 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 crate::consts::{constant_simple, Constant};
use rustc::hir::*; use rustc::hir::*;
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::codemap::Span; use syntax::codemap::Span;
use crate::utils::{in_macro, snippet, span_lint, unsext, clip}; use crate::utils::{in_macro, snippet, span_lint, unsext, clip};
use rustc::ty; use rustc::ty;

View file

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

View file

@ -2,6 +2,7 @@
//! on the condition //! on the condition
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast::*; use syntax::ast::*;
use crate::utils::{in_external_macro, span_help_and_lint}; 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 crate::utils::higher::Range;
use rustc::hir::*; use rustc::hir::*;
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::ty; use rustc::ty;
use syntax::ast::RangeLimits; use syntax::ast::RangeLimits;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,7 @@
//! lint when items are used after statements //! lint when items are used after statements
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast::*; use syntax::ast::*;
use crate::utils::{in_macro, span_lint}; 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 //! lint when there is a large size difference between variants on an enum
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*; use rustc::hir::*;
use crate::utils::{snippet_opt, span_lint_and_then}; use crate::utils::{snippet_opt, span_lint_and_then};
use rustc::ty::layout::LayoutOf; use rustc::ty::layout::LayoutOf;

View file

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

View file

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

View file

@ -15,9 +15,6 @@
#![warn(rust_2018_idioms)] #![warn(rust_2018_idioms)]
#![allow(macro_use_extern_crate)] #![allow(macro_use_extern_crate)]
#[macro_use]
extern crate rustc;
use toml; use toml;
use rustc_plugin; use rustc_plugin;

View file

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

View file

@ -2,6 +2,7 @@
//! floating-point literal expressions. //! floating-point literal expressions.
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::ast::*; use syntax::ast::*;
use syntax_pos; use syntax_pos;
use crate::utils::{in_external_macro, snippet_opt, span_lint_and_sugg}; use crate::utils::{in_external_macro, snippet_opt, span_lint_and_sugg};

View file

@ -6,6 +6,7 @@ use rustc::hir::def_id;
use rustc::hir::intravisit::{walk_block, walk_decl, walk_expr, walk_pat, walk_stmt, NestedVisitorMap, Visitor}; 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::hir::map::Node::{NodeBlock, NodeExpr, NodeStmt};
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::middle::region; use rustc::middle::region;
// use rustc::middle::region::CodeExtent; // use rustc::middle::region::CodeExtent;
use rustc::middle::expr_use_visitor::*; use rustc::middle::expr_use_visitor::*;

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,6 @@
use rustc::hir; use rustc::hir;
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::ty::{self, Ty}; use rustc::ty::{self, Ty};
use rustc::hir::def::Def; use rustc::hir::def::Def;
use std::borrow::Cow; 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 crate::utils::{match_def_path, opt_def_id, paths, span_lint};
use rustc::hir::*; use rustc::hir::*;
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use std::cmp::Ordering; use std::cmp::Ordering;
/// **What it does:** Checks for expressions where `std::cmp::min` and `max` are /// **What it does:** Checks for expressions where `std::cmp::min` and `max` are

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -3,6 +3,7 @@
//! This lint is **warn** by default //! This lint is **warn** by default
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::{BindingAnnotation, Expr, ExprKind, MutImmutable, Pat, PatKind}; use rustc::hir::{BindingAnnotation, Expr, ExprKind, MutImmutable, Pat, PatKind};
use rustc::ty; use rustc::ty;
use rustc::ty::adjustment::{Adjust, Adjustment}; use rustc::ty::adjustment::{Adjust, Adjustment};

View file

@ -3,6 +3,7 @@
//! This lint is **warn** by default //! This lint is **warn** by default
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::{BindingAnnotation, MutImmutable, Pat, PatKind}; use rustc::hir::{BindingAnnotation, MutImmutable, Pat, PatKind};
use crate::utils::{in_macro, snippet, span_lint_and_then}; use crate::utils::{in_macro, snippet, span_lint_and_then};

View file

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

View file

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

View file

@ -1,4 +1,5 @@
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::{declare_lint, lint_array};
use rustc::ty; use rustc::ty;
use rustc::hir::{Expr, ExprKind}; use rustc::hir::{Expr, ExprKind};
use crate::utils::span_lint; use crate::utils::span_lint;

View file

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

View file

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

View file

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

View file

@ -1,4 +1,5 @@
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::{declare_lint, lint_array};
use rustc::hir::def::Def; use rustc::hir::def::Def;
use rustc::hir::{BinOpKind, BlockCheckMode, Expr, ExprKind, Stmt, StmtKind, UnsafeSource}; 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}; 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. //! This lint is **deny** by default.
use rustc::lint::{LateContext, LateLintPass, Lint, LintArray, LintPass}; use rustc::lint::{LateContext, LateLintPass, Lint, LintArray, LintPass};
use rustc::{declare_lint, lint_array};
use rustc::hir::*; use rustc::hir::*;
use rustc::hir::def::Def; use rustc::hir::def::Def;
use rustc::ty::{self, TypeFlags}; use rustc::ty::{self, TypeFlags};

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,5 @@
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use rustc::hir::*; use rustc::hir::*;
use crate::utils::{in_macro, is_range_expression, match_var, span_lint_and_sugg}; use crate::utils::{in_macro, is_range_expression, match_var, span_lint_and_sugg};

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,6 @@
use rustc::hir::*; use rustc::hir::*;
use rustc::lint::*; use rustc::lint::*;
use rustc::{declare_lint, lint_array};
use syntax::codemap::Spanned; use syntax::codemap::Spanned;
use crate::utils::SpanlessEq; use crate::utils::SpanlessEq;
use crate::utils::{get_parent_expr, is_allowed, match_type, paths, span_lint, span_lint_and_sugg, walk_ptrs_ty}; use crate::utils::{get_parent_expr, is_allowed, match_type, paths, span_lint, span_lint_and_sugg, walk_ptrs_ty};

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