diff --git a/clippy_lints/src/approx_const.rs b/clippy_lints/src/approx_const.rs index fe00d325f77..99b9e79463a 100644 --- a/clippy_lints/src/approx_const.rs +++ b/clippy_lints/src/approx_const.rs @@ -1,7 +1,7 @@ use crate::utils::span_lint; use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use std::f64::consts as f64; use syntax::ast::{FloatTy, Lit, LitKind}; use syntax::symbol; diff --git a/clippy_lints/src/arithmetic.rs b/clippy_lints/src/arithmetic.rs index 209963e0688..fa48b2b5506 100644 --- a/clippy_lints/src/arithmetic.rs +++ b/clippy_lints/src/arithmetic.rs @@ -1,7 +1,7 @@ use crate::utils::span_lint; use rustc::hir; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::source_map::Span; /// **What it does:** Checks for plain integer arithmetic. diff --git a/clippy_lints/src/assign_ops.rs b/clippy_lints/src/assign_ops.rs index 28fd96e3aac..5a27f6a2c36 100644 --- a/clippy_lints/src/assign_ops.rs +++ b/clippy_lints/src/assign_ops.rs @@ -3,7 +3,7 @@ use crate::utils::{higher, sugg}; use rustc::hir; use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor}; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use syntax::ast; diff --git a/clippy_lints/src/attrs.rs b/clippy_lints/src/attrs.rs index 66144706816..034c2cc241a 100644 --- a/clippy_lints/src/attrs.rs +++ b/clippy_lints/src/attrs.rs @@ -7,7 +7,7 @@ use crate::utils::{ }; use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty::{self, TyCtxt}; use semver::Version; diff --git a/clippy_lints/src/bit_mask.rs b/clippy_lints/src/bit_mask.rs index 86788fded05..ecac7f8250b 100644 --- a/clippy_lints/src/bit_mask.rs +++ b/clippy_lints/src/bit_mask.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use syntax::ast::LitKind; use syntax::source_map::Span; diff --git a/clippy_lints/src/blacklisted_name.rs b/clippy_lints/src/blacklisted_name.rs index e5af0789064..97749e6f997 100644 --- a/clippy_lints/src/blacklisted_name.rs +++ b/clippy_lints/src/blacklisted_name.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use crate::utils::span_lint; diff --git a/clippy_lints/src/block_in_if_condition.rs b/clippy_lints/src/block_in_if_condition.rs index f57a3571b57..752d640fa9e 100644 --- a/clippy_lints/src/block_in_if_condition.rs +++ b/clippy_lints/src/block_in_if_condition.rs @@ -1,6 +1,6 @@ use matches::matches; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor}; use crate::utils::*; diff --git a/clippy_lints/src/booleans.rs b/clippy_lints/src/booleans.rs index eda6a045cba..f867dc56c3c 100644 --- a/clippy_lints/src/booleans.rs +++ b/clippy_lints/src/booleans.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use rustc::hir::intravisit::*; use syntax::ast::{LitKind, NodeId, DUMMY_NODE_ID}; diff --git a/clippy_lints/src/bytecount.rs b/clippy_lints/src/bytecount.rs index 5c9b571c78c..ddc017c27df 100644 --- a/clippy_lints/src/bytecount.rs +++ b/clippy_lints/src/bytecount.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty; use syntax::ast::{Name, UintTy}; diff --git a/clippy_lints/src/collapsible_if.rs b/clippy_lints/src/collapsible_if.rs index 09fcf47c920..55cc94f399f 100644 --- a/clippy_lints/src/collapsible_if.rs +++ b/clippy_lints/src/collapsible_if.rs @@ -13,7 +13,7 @@ //! This lint is **warn** by default use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use syntax::ast; diff --git a/clippy_lints/src/const_static_lifetime.rs b/clippy_lints/src/const_static_lifetime.rs index 1af0741d67f..83dd4c0509e 100644 --- a/clippy_lints/src/const_static_lifetime.rs +++ b/clippy_lints/src/const_static_lifetime.rs @@ -1,6 +1,6 @@ use syntax::ast::*; use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use crate::utils::{in_macro, snippet, span_lint_and_then}; /// **What it does:** Checks for constants with an explicit `'static` lifetime. diff --git a/clippy_lints/src/copies.rs b/clippy_lints/src/copies.rs index 42788e77d6e..8f1823be15a 100644 --- a/clippy_lints/src/copies.rs +++ b/clippy_lints/src/copies.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::ty::Ty; use rustc::hir::*; use std::collections::HashMap; diff --git a/clippy_lints/src/cyclomatic_complexity.rs b/clippy_lints/src/cyclomatic_complexity.rs index ee53fca9f70..6195db7b482 100644 --- a/clippy_lints/src/cyclomatic_complexity.rs +++ b/clippy_lints/src/cyclomatic_complexity.rs @@ -2,7 +2,7 @@ use rustc::cfg::CFG; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use rustc::ty; use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor}; diff --git a/clippy_lints/src/default_trait_access.rs b/clippy_lints/src/default_trait_access.rs index 09c60760076..cb79883372a 100644 --- a/clippy_lints/src/default_trait_access.rs +++ b/clippy_lints/src/default_trait_access.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty::TyKind; diff --git a/clippy_lints/src/derive.rs b/clippy_lints/src/derive.rs index 9df2e257b1e..2a26cca21ac 100644 --- a/clippy_lints/src/derive.rs +++ b/clippy_lints/src/derive.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty::{self, Ty}; use rustc::hir::*; diff --git a/clippy_lints/src/doc.rs b/clippy_lints/src/doc.rs index 957ede66698..2db950b3365 100644 --- a/clippy_lints/src/doc.rs +++ b/clippy_lints/src/doc.rs @@ -1,7 +1,7 @@ use itertools::Itertools; use pulldown_cmark; use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast; use syntax::source_map::{BytePos, Span}; use syntax_pos::Pos; diff --git a/clippy_lints/src/double_comparison.rs b/clippy_lints/src/double_comparison.rs index 70dc532e55b..1f38be4d7b7 100644 --- a/clippy_lints/src/double_comparison.rs +++ b/clippy_lints/src/double_comparison.rs @@ -2,7 +2,7 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::source_map::Span; use crate::utils::{snippet, span_lint_and_sugg, SpanlessEq}; diff --git a/clippy_lints/src/double_parens.rs b/clippy_lints/src/double_parens.rs index abd5666385d..42d6720d96c 100644 --- a/clippy_lints/src/double_parens.rs +++ b/clippy_lints/src/double_parens.rs @@ -1,6 +1,6 @@ use syntax::ast::*; use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintContext, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; /// **What it does:** Checks for unnecessary double parentheses. /// diff --git a/clippy_lints/src/drop_forget_ref.rs b/clippy_lints/src/drop_forget_ref.rs index 5aca7d734e2..be804780ff5 100644 --- a/clippy_lints/src/drop_forget_ref.rs +++ b/clippy_lints/src/drop_forget_ref.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty; use rustc::hir::*; diff --git a/clippy_lints/src/duration_subsec.rs b/clippy_lints/src/duration_subsec.rs index 77d3014d9fd..5853983dcf0 100644 --- a/clippy_lints/src/duration_subsec.rs +++ b/clippy_lints/src/duration_subsec.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use syntax::source_map::Spanned; diff --git a/clippy_lints/src/else_if_without_else.rs b/clippy_lints/src/else_if_without_else.rs index 1259b49d93a..1c026713a5d 100644 --- a/clippy_lints/src/else_if_without_else.rs +++ b/clippy_lints/src/else_if_without_else.rs @@ -1,7 +1,7 @@ //! lint on if expressions with an else if, but without a final else branch use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass, in_external_macro, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast::*; use crate::utils::span_lint_and_sugg; diff --git a/clippy_lints/src/empty_enum.rs b/clippy_lints/src/empty_enum.rs index 86f9fbdba9b..195a78a89e5 100644 --- a/clippy_lints/src/empty_enum.rs +++ b/clippy_lints/src/empty_enum.rs @@ -1,7 +1,7 @@ //! lint when there is an enum with no variants use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use crate::utils::span_lint_and_then; diff --git a/clippy_lints/src/entry.rs b/clippy_lints/src/entry.rs index 46ef16ddc73..8a2fcbaea46 100644 --- a/clippy_lints/src/entry.rs +++ b/clippy_lints/src/entry.rs @@ -1,7 +1,7 @@ use rustc::hir::*; use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor}; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use syntax::source_map::Span; use crate::utils::SpanlessEq; diff --git a/clippy_lints/src/enum_clike.rs b/clippy_lints/src/enum_clike.rs index 2402cfde5b3..3a7f884b784 100644 --- a/clippy_lints/src/enum_clike.rs +++ b/clippy_lints/src/enum_clike.rs @@ -2,7 +2,7 @@ //! don't fit into an `i32` use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use rustc::ty; use rustc::ty::subst::Substs; diff --git a/clippy_lints/src/enum_glob_use.rs b/clippy_lints/src/enum_glob_use.rs index 90cc1716cc1..042a4765e2b 100644 --- a/clippy_lints/src/enum_glob_use.rs +++ b/clippy_lints/src/enum_glob_use.rs @@ -3,7 +3,7 @@ use rustc::hir::*; use rustc::hir::def::Def; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast::NodeId; use syntax::source_map::Span; use crate::utils::span_lint; diff --git a/clippy_lints/src/enum_variants.rs b/clippy_lints/src/enum_variants.rs index 51277516571..85b133cbd03 100644 --- a/clippy_lints/src/enum_variants.rs +++ b/clippy_lints/src/enum_variants.rs @@ -1,7 +1,7 @@ //! lint on enum variants that are prefixed or suffixed by the same characters use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass, Lint}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast::*; use syntax::source_map::Span; use syntax::symbol::LocalInternedString; diff --git a/clippy_lints/src/eq_op.rs b/clippy_lints/src/eq_op.rs index a08d9f39382..de1b5b77e6e 100644 --- a/clippy_lints/src/eq_op.rs +++ b/clippy_lints/src/eq_op.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_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 diff --git a/clippy_lints/src/erasing_op.rs b/clippy_lints/src/erasing_op.rs index e6d70b22fde..5b61a9fd883 100644 --- a/clippy_lints/src/erasing_op.rs +++ b/clippy_lints/src/erasing_op.rs @@ -1,7 +1,7 @@ use crate::consts::{constant_simple, Constant}; use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::source_map::Span; use crate::utils::{in_macro, span_lint}; diff --git a/clippy_lints/src/escape.rs b/clippy_lints/src/escape.rs index 3c61509d1f7..282149f81f9 100644 --- a/clippy_lints/src/escape.rs +++ b/clippy_lints/src/escape.rs @@ -1,7 +1,7 @@ use rustc::hir::*; use rustc::hir::intravisit as visit; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::middle::expr_use_visitor::*; use rustc::middle::mem_categorization::{cmt_, Categorization}; use rustc::ty::{self, Ty}; diff --git a/clippy_lints/src/eta_reduction.rs b/clippy_lints/src/eta_reduction.rs index f60785662dd..c4ffc70dbfd 100644 --- a/clippy_lints/src/eta_reduction.rs +++ b/clippy_lints/src/eta_reduction.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::ty; use rustc::hir::*; use crate::utils::{is_adjusted, iter_input_pats, snippet_opt, span_lint_and_then}; diff --git a/clippy_lints/src/eval_order_dependence.rs b/clippy_lints/src/eval_order_dependence.rs index f1c31d095e1..72abbddf141 100644 --- a/clippy_lints/src/eval_order_dependence.rs +++ b/clippy_lints/src/eval_order_dependence.rs @@ -2,7 +2,7 @@ use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor}; use rustc::hir::*; use rustc::ty; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use syntax::ast; use crate::utils::{get_parent_expr, span_lint, span_note_and_lint}; diff --git a/clippy_lints/src/excessive_precision.rs b/clippy_lints/src/excessive_precision.rs index df540cad931..e5809371e83 100644 --- a/clippy_lints/src/excessive_precision.rs +++ b/clippy_lints/src/excessive_precision.rs @@ -1,6 +1,6 @@ use rustc::hir; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty::TyKind; use std::f32; diff --git a/clippy_lints/src/explicit_write.rs b/clippy_lints/src/explicit_write.rs index f0cee563a2e..77c6c1a4ad7 100644 --- a/clippy_lints/src/explicit_write.rs +++ b/clippy_lints/src/explicit_write.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_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; diff --git a/clippy_lints/src/fallible_impl_from.rs b/clippy_lints/src/fallible_impl_from.rs index f541abee8a7..88eb880311e 100644 --- a/clippy_lints/src/fallible_impl_from.rs +++ b/clippy_lints/src/fallible_impl_from.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::hir; use rustc::ty; diff --git a/clippy_lints/src/format.rs b/clippy_lints/src/format.rs index f967b9ce58e..c10d554660a 100644 --- a/clippy_lints/src/format.rs +++ b/clippy_lints/src/format.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty; use syntax::ast::LitKind; diff --git a/clippy_lints/src/formatting.rs b/clippy_lints/src/formatting.rs index 2f46891e6a1..8b20aeed108 100644 --- a/clippy_lints/src/formatting.rs +++ b/clippy_lints/src/formatting.rs @@ -1,5 +1,5 @@ use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast; use crate::utils::{differing_macro_contexts, in_macro, snippet_opt, span_note_and_lint}; use syntax::ptr::P; diff --git a/clippy_lints/src/functions.rs b/clippy_lints/src/functions.rs index 2f076dc1f6e..c170b0a1e15 100644 --- a/clippy_lints/src/functions.rs +++ b/clippy_lints/src/functions.rs @@ -2,7 +2,7 @@ use matches::matches; use rustc::hir::intravisit; use rustc::hir; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::ty; use rustc::hir::def::Def; use std::collections::HashSet; diff --git a/clippy_lints/src/identity_conversion.rs b/clippy_lints/src/identity_conversion.rs index 3fa30dee988..6adf2cd6814 100644 --- a/clippy_lints/src/identity_conversion.rs +++ b/clippy_lints/src/identity_conversion.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_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}; diff --git a/clippy_lints/src/identity_op.rs b/clippy_lints/src/identity_op.rs index b0c290ffc0e..bb3741088cf 100644 --- a/clippy_lints/src/identity_op.rs +++ b/clippy_lints/src/identity_op.rs @@ -1,7 +1,7 @@ use crate::consts::{constant_simple, Constant}; use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::source_map::Span; use crate::utils::{in_macro, snippet, span_lint, unsext, clip}; use rustc::ty; diff --git a/clippy_lints/src/if_let_redundant_pattern_matching.rs b/clippy_lints/src/if_let_redundant_pattern_matching.rs index f1b8aadef67..253d295567c 100644 --- a/clippy_lints/src/if_let_redundant_pattern_matching.rs +++ b/clippy_lints/src/if_let_redundant_pattern_matching.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use crate::utils::{match_qpath, paths, snippet, span_lint_and_then}; diff --git a/clippy_lints/src/if_not_else.rs b/clippy_lints/src/if_not_else.rs index 153bfbb9779..3bfde1fd20d 100644 --- a/clippy_lints/src/if_not_else.rs +++ b/clippy_lints/src/if_not_else.rs @@ -2,7 +2,7 @@ //! on the condition use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass, in_external_macro, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast::*; use crate::utils::span_help_and_lint; diff --git a/clippy_lints/src/indexing_slicing.rs b/clippy_lints/src/indexing_slicing.rs index 01a659473c1..bca4844aae7 100644 --- a/clippy_lints/src/indexing_slicing.rs +++ b/clippy_lints/src/indexing_slicing.rs @@ -6,7 +6,7 @@ use crate::utils::higher; use crate::utils::higher::Range; use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::ty; use syntax::ast::RangeLimits; diff --git a/clippy_lints/src/infallible_destructuring_match.rs b/clippy_lints/src/infallible_destructuring_match.rs index a085f32ed84..208f2ec5379 100644 --- a/clippy_lints/src/infallible_destructuring_match.rs +++ b/clippy_lints/src/infallible_destructuring_match.rs @@ -1,7 +1,7 @@ use super::utils::{get_arg_name, match_var, remove_blocks, snippet, span_lint_and_sugg}; use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; /// **What it does:** Checks for matches being used to destructure a single-variant enum diff --git a/clippy_lints/src/infinite_iter.rs b/clippy_lints/src/infinite_iter.rs index d42a2380ec4..bb33c48fc3f 100644 --- a/clippy_lints/src/infinite_iter.rs +++ b/clippy_lints/src/infinite_iter.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_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. diff --git a/clippy_lints/src/inherent_impl.rs b/clippy_lints/src/inherent_impl.rs index 46dbb5bc39f..4ca812e56bd 100644 --- a/clippy_lints/src/inherent_impl.rs +++ b/clippy_lints/src/inherent_impl.rs @@ -2,7 +2,7 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use std::collections::HashMap; use std::default::Default; use syntax_pos::Span; diff --git a/clippy_lints/src/inline_fn_without_body.rs b/clippy_lints/src/inline_fn_without_body.rs index b879d734929..4dcc4ed473d 100644 --- a/clippy_lints/src/inline_fn_without_body.rs +++ b/clippy_lints/src/inline_fn_without_body.rs @@ -1,7 +1,7 @@ //! checks for `#[inline]` on trait methods without bodies use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use syntax::ast::{Attribute, Name}; use crate::utils::span_lint_and_then; diff --git a/clippy_lints/src/int_plus_one.rs b/clippy_lints/src/int_plus_one.rs index 086567ac531..b640eff2c5d 100644 --- a/clippy_lints/src/int_plus_one.rs +++ b/clippy_lints/src/int_plus_one.rs @@ -1,7 +1,7 @@ //! lint on blocks unnecessarily using >= with a + 1 or - 1 use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast::*; use crate::utils::{snippet_opt, span_lint_and_then}; diff --git a/clippy_lints/src/invalid_ref.rs b/clippy_lints/src/invalid_ref.rs index 58f1575abb6..34a8939e104 100644 --- a/clippy_lints/src/invalid_ref.rs +++ b/clippy_lints/src/invalid_ref.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty; use rustc::hir::*; diff --git a/clippy_lints/src/items_after_statements.rs b/clippy_lints/src/items_after_statements.rs index 2ea6c0e0447..9fe70882c86 100644 --- a/clippy_lints/src/items_after_statements.rs +++ b/clippy_lints/src/items_after_statements.rs @@ -2,7 +2,7 @@ use matches::matches; use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast::*; use crate::utils::{in_macro, span_lint}; diff --git a/clippy_lints/src/large_enum_variant.rs b/clippy_lints/src/large_enum_variant.rs index 3e49f866170..63201bb2e45 100644 --- a/clippy_lints/src/large_enum_variant.rs +++ b/clippy_lints/src/large_enum_variant.rs @@ -1,7 +1,7 @@ //! lint when there is a large size difference between variants on an enum use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use crate::utils::{snippet_opt, span_lint_and_then}; use rustc::ty::layout::LayoutOf; diff --git a/clippy_lints/src/len_zero.rs b/clippy_lints/src/len_zero.rs index e14f3bc24b7..4c9c219828d 100644 --- a/clippy_lints/src/len_zero.rs +++ b/clippy_lints/src/len_zero.rs @@ -1,7 +1,7 @@ use rustc::hir::def_id::DefId; use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::ty; use std::collections::HashSet; use syntax::ast::{Lit, LitKind, Name}; diff --git a/clippy_lints/src/let_if_seq.rs b/clippy_lints/src/let_if_seq.rs index 494efc22538..8b4e2b0dec8 100644 --- a/clippy_lints/src/let_if_seq.rs +++ b/clippy_lints/src/let_if_seq.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::hir; use rustc::hir::BindingAnnotation; diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 87a906ad83d..32c3dca6357 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -17,34 +17,34 @@ use rustc; macro_rules! declare_clippy_lint { { pub $name:tt, style, $description:tt } => { - declare_lint! { pub $name, Warn, $description, report_in_external_macro: true, clippy } + declare_tool_lint! { pub clippy::$name, Warn, $description, report_in_external_macro: true } }; { pub $name:tt, correctness, $description:tt } => { - declare_lint! { pub $name, Deny, $description, report_in_external_macro: true, clippy } + declare_tool_lint! { pub clippy::$name, Deny, $description, report_in_external_macro: true } }; { pub $name:tt, complexity, $description:tt } => { - declare_lint! { pub $name, Warn, $description, report_in_external_macro: true, clippy } + declare_tool_lint! { pub clippy::$name, Warn, $description, report_in_external_macro: true } }; { pub $name:tt, perf, $description:tt } => { - declare_lint! { pub $name, Warn, $description, report_in_external_macro: true, clippy } + declare_tool_lint! { pub clippy::$name, Warn, $description, report_in_external_macro: true } }; { pub $name:tt, pedantic, $description:tt } => { - declare_lint! { pub $name, Allow, $description, report_in_external_macro: true, clippy } + declare_tool_lint! { pub clippy::$name, Allow, $description, report_in_external_macro: true } }; { pub $name:tt, restriction, $description:tt } => { - declare_lint! { pub $name, Allow, $description, report_in_external_macro: true, clippy } + declare_tool_lint! { pub clippy::$name, Allow, $description, report_in_external_macro: true } }; { pub $name:tt, cargo, $description:tt } => { - declare_lint! { pub $name, Allow, $description, report_in_external_macro: true, clippy } + declare_tool_lint! { pub clippy::$name, Allow, $description, report_in_external_macro: true } }; { pub $name:tt, nursery, $description:tt } => { - declare_lint! { pub $name, Allow, $description, report_in_external_macro: true, clippy } + declare_tool_lint! { pub clippy::$name, Allow, $description, report_in_external_macro: true } }; { pub $name:tt, internal, $description:tt } => { - declare_lint! { pub $name, Allow, $description, report_in_external_macro: true, clippy } + declare_tool_lint! { pub clippy::$name, Allow, $description, report_in_external_macro: true } }; { pub $name:tt, internal_warn, $description:tt } => { - declare_lint! { pub $name, Warn, $description, report_in_external_macro: true, clippy } + declare_tool_lint! { pub clippy::$name, Warn, $description, report_in_external_macro: true } }; } diff --git a/clippy_lints/src/lifetimes.rs b/clippy_lints/src/lifetimes.rs index 7da62b9d458..beec9bac940 100644 --- a/clippy_lints/src/lifetimes.rs +++ b/clippy_lints/src/lifetimes.rs @@ -1,7 +1,7 @@ use crate::reexport::*; use matches::matches; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass, in_external_macro, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::def::Def; use rustc::hir::*; use rustc::hir::intravisit::*; diff --git a/clippy_lints/src/literal_representation.rs b/clippy_lints/src/literal_representation.rs index 9437b243cbb..dcffba80b3b 100644 --- a/clippy_lints/src/literal_representation.rs +++ b/clippy_lints/src/literal_representation.rs @@ -2,7 +2,7 @@ //! floating-point literal expressions. use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass, in_external_macro, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use syntax::ast::*; use syntax_pos; diff --git a/clippy_lints/src/loops.rs b/clippy_lints/src/loops.rs index 988256ab29e..51e6327e728 100644 --- a/clippy_lints/src/loops.rs +++ b/clippy_lints/src/loops.rs @@ -5,7 +5,7 @@ use rustc::hir::def::Def; use rustc::hir::def_id; use rustc::hir::intravisit::{walk_block, walk_decl, walk_expr, walk_pat, walk_stmt, NestedVisitorMap, Visitor}; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass, in_external_macro, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::middle::region; // use rustc::middle::region::CodeExtent; diff --git a/clippy_lints/src/map_clone.rs b/clippy_lints/src/map_clone.rs index bd304db2dd5..1a501b39eb5 100644 --- a/clippy_lints/src/map_clone.rs +++ b/clippy_lints/src/map_clone.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::hir::*; use rustc::ty; diff --git a/clippy_lints/src/map_unit_fn.rs b/clippy_lints/src/map_unit_fn.rs index 2376b1a2b48..90f149a1c01 100644 --- a/clippy_lints/src/map_unit_fn.rs +++ b/clippy_lints/src/map_unit_fn.rs @@ -1,6 +1,6 @@ use rustc::hir; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty; use rustc_errors::Applicability; diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs index 6dc16e623a4..3ecf5d3b5b8 100644 --- a/clippy_lints/src/matches.rs +++ b/clippy_lints/src/matches.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass, in_external_macro, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty::{self, Ty}; use std::cmp::Ordering; diff --git a/clippy_lints/src/mem_forget.rs b/clippy_lints/src/mem_forget.rs index 76df98727f9..8a56dccad2d 100644 --- a/clippy_lints/src/mem_forget.rs +++ b/clippy_lints/src/mem_forget.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::{Expr, ExprKind}; use crate::utils::{match_def_path, opt_def_id, paths, span_lint}; diff --git a/clippy_lints/src/methods.rs b/clippy_lints/src/methods.rs index 3bc1282fa15..4f6cb64dd4f 100644 --- a/clippy_lints/src/methods.rs +++ b/clippy_lints/src/methods.rs @@ -1,7 +1,7 @@ use matches::matches; use rustc::hir; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass, in_external_macro, Lint, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty::{self, Ty}; use rustc::hir::def::Def; diff --git a/clippy_lints/src/minmax.rs b/clippy_lints/src/minmax.rs index b187c28def6..bbbc022f08d 100644 --- a/clippy_lints/src/minmax.rs +++ b/clippy_lints/src/minmax.rs @@ -2,7 +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::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use std::cmp::Ordering; /// **What it does:** Checks for expressions where `std::cmp::min` and `max` are diff --git a/clippy_lints/src/misc.rs b/clippy_lints/src/misc.rs index 7fab12bd9d9..302af13630b 100644 --- a/clippy_lints/src/misc.rs +++ b/clippy_lints/src/misc.rs @@ -3,7 +3,7 @@ use matches::matches; use rustc::hir::*; use rustc::hir::intravisit::FnKind; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty; use syntax::source_map::{ExpnFormat, Span}; diff --git a/clippy_lints/src/misc_early.rs b/clippy_lints/src/misc_early.rs index 4edb6a9133a..c00b3d93c47 100644 --- a/clippy_lints/src/misc_early.rs +++ b/clippy_lints/src/misc_early.rs @@ -1,5 +1,5 @@ use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass, LintContext, in_external_macro}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use std::collections::HashMap; use std::char; diff --git a/clippy_lints/src/missing_doc.rs b/clippy_lints/src/missing_doc.rs index 339ab757702..f56a8fcd8b5 100644 --- a/clippy_lints/src/missing_doc.rs +++ b/clippy_lints/src/missing_doc.rs @@ -20,7 +20,7 @@ use rustc::hir; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::ty; use syntax::ast; use syntax::attr; diff --git a/clippy_lints/src/missing_inline.rs b/clippy_lints/src/missing_inline.rs index c0f12bd3f7e..bf88caa6ab9 100644 --- a/clippy_lints/src/missing_inline.rs +++ b/clippy_lints/src/missing_inline.rs @@ -11,7 +11,7 @@ use rustc::hir; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast; use syntax::source_map::Span; use crate::utils::span_lint; diff --git a/clippy_lints/src/multiple_crate_versions.rs b/clippy_lints/src/multiple_crate_versions.rs index 78458843ffc..a2ed6a1dea1 100644 --- a/clippy_lints/src/multiple_crate_versions.rs +++ b/clippy_lints/src/multiple_crate_versions.rs @@ -1,7 +1,7 @@ //! lint on multiple versions of a crate being used use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast::*; use crate::utils::span_lint; diff --git a/clippy_lints/src/mut_mut.rs b/clippy_lints/src/mut_mut.rs index 5c8a2648a18..ea3d68dfc83 100644 --- a/clippy_lints/src/mut_mut.rs +++ b/clippy_lints/src/mut_mut.rs @@ -1,7 +1,7 @@ use rustc::hir; use rustc::hir::intravisit; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass, in_external_macro, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::ty; use crate::utils::{higher, span_lint}; diff --git a/clippy_lints/src/mut_reference.rs b/clippy_lints/src/mut_reference.rs index 5b562f3dd34..97287aa833f 100644 --- a/clippy_lints/src/mut_reference.rs +++ b/clippy_lints/src/mut_reference.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::ty::{self, Ty}; use rustc::ty::subst::Subst; use rustc::hir::*; diff --git a/clippy_lints/src/mutex_atomic.rs b/clippy_lints/src/mutex_atomic.rs index 8b56526f495..cb400ee4ee3 100644 --- a/clippy_lints/src/mutex_atomic.rs +++ b/clippy_lints/src/mutex_atomic.rs @@ -3,7 +3,7 @@ //! This lint is **warn** by default use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::ty::{self, Ty}; use rustc::hir::Expr; use syntax::ast; diff --git a/clippy_lints/src/needless_bool.rs b/clippy_lints/src/needless_bool.rs index 90b38440a83..5b9a479c1fc 100644 --- a/clippy_lints/src/needless_bool.rs +++ b/clippy_lints/src/needless_bool.rs @@ -3,7 +3,7 @@ //! This lint is **warn** by default use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use syntax::ast::LitKind; use syntax::source_map::Spanned; diff --git a/clippy_lints/src/needless_borrow.rs b/clippy_lints/src/needless_borrow.rs index b8ac425fd59..a194cb2c61b 100644 --- a/clippy_lints/src/needless_borrow.rs +++ b/clippy_lints/src/needless_borrow.rs @@ -3,7 +3,7 @@ //! This lint is **warn** by default use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::hir::{BindingAnnotation, Expr, ExprKind, MutImmutable, Pat, PatKind}; use rustc::ty; diff --git a/clippy_lints/src/needless_borrowed_ref.rs b/clippy_lints/src/needless_borrowed_ref.rs index d5a16f2122f..4905dbc8e6b 100644 --- a/clippy_lints/src/needless_borrowed_ref.rs +++ b/clippy_lints/src/needless_borrowed_ref.rs @@ -3,7 +3,7 @@ //! This lint is **warn** by default use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_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}; diff --git a/clippy_lints/src/needless_continue.rs b/clippy_lints/src/needless_continue.rs index e5f01847ed1..e14cd0fea89 100644 --- a/clippy_lints/src/needless_continue.rs +++ b/clippy_lints/src/needless_continue.rs @@ -28,7 +28,7 @@ //! //! This lint is **warn** by default. use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast; use syntax::source_map::{original_sp, DUMMY_SP}; use std::borrow::Cow; diff --git a/clippy_lints/src/needless_pass_by_value.rs b/clippy_lints/src/needless_pass_by_value.rs index 06baf895c93..340fa4d0ee0 100644 --- a/clippy_lints/src/needless_pass_by_value.rs +++ b/clippy_lints/src/needless_pass_by_value.rs @@ -2,7 +2,7 @@ use matches::matches; use rustc::hir::*; use rustc::hir::intravisit::FnKind; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty::{self, RegionKind, TypeFoldable}; use rustc::traits; diff --git a/clippy_lints/src/needless_update.rs b/clippy_lints/src/needless_update.rs index 90a1ee14a6d..dccb7f2e037 100644 --- a/clippy_lints/src/needless_update.rs +++ b/clippy_lints/src/needless_update.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::ty; use rustc::hir::{Expr, ExprKind}; use crate::utils::span_lint; diff --git a/clippy_lints/src/neg_cmp_op_on_partial_ord.rs b/clippy_lints/src/neg_cmp_op_on_partial_ord.rs index bec875d16d6..db61ea375c3 100644 --- a/clippy_lints/src/neg_cmp_op_on_partial_ord.rs +++ b/clippy_lints/src/neg_cmp_op_on_partial_ord.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass, in_external_macro, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use crate::utils::{self, paths, span_lint}; diff --git a/clippy_lints/src/neg_multiply.rs b/clippy_lints/src/neg_multiply.rs index 5246e62aecb..8df33b1e99a 100644 --- a/clippy_lints/src/neg_multiply.rs +++ b/clippy_lints/src/neg_multiply.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use syntax::source_map::{Span, Spanned}; diff --git a/clippy_lints/src/new_without_default.rs b/clippy_lints/src/new_without_default.rs index 4dd2ea98399..493e8d0f4ce 100644 --- a/clippy_lints/src/new_without_default.rs +++ b/clippy_lints/src/new_without_default.rs @@ -1,7 +1,7 @@ use rustc::hir::def_id::DefId; use rustc::hir; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass, in_external_macro, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty::{self, Ty}; use syntax::source_map::Span; diff --git a/clippy_lints/src/no_effect.rs b/clippy_lints/src/no_effect.rs index cacb5d6a9ff..09a27330750 100644 --- a/clippy_lints/src/no_effect.rs +++ b/clippy_lints/src/no_effect.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_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}; diff --git a/clippy_lints/src/non_copy_const.rs b/clippy_lints/src/non_copy_const.rs index c2692f88187..deb088d3ea4 100644 --- a/clippy_lints/src/non_copy_const.rs +++ b/clippy_lints/src/non_copy_const.rs @@ -3,7 +3,7 @@ //! This lint is **deny** by default. use rustc::lint::{LateContext, LateLintPass, Lint, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use rustc::hir::def::Def; use rustc::ty::{self, TypeFlags}; diff --git a/clippy_lints/src/non_expressive_names.rs b/clippy_lints/src/non_expressive_names.rs index 14aba635c1a..0b0fe28a90b 100644 --- a/clippy_lints/src/non_expressive_names.rs +++ b/clippy_lints/src/non_expressive_names.rs @@ -1,5 +1,5 @@ use rustc::lint::{LintArray, LintPass, EarlyContext, EarlyLintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::source_map::Span; use syntax::symbol::LocalInternedString; use syntax::ast::*; diff --git a/clippy_lints/src/ok_if_let.rs b/clippy_lints/src/ok_if_let.rs index 52eb86a0bc0..651ed44110f 100644 --- a/clippy_lints/src/ok_if_let.rs +++ b/clippy_lints/src/ok_if_let.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_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}; diff --git a/clippy_lints/src/open_options.rs b/clippy_lints/src/open_options.rs index bfb88449fba..b5459059e90 100644 --- a/clippy_lints/src/open_options.rs +++ b/clippy_lints/src/open_options.rs @@ -1,6 +1,6 @@ use rustc::hir::{Expr, ExprKind}; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast::LitKind; use syntax::source_map::{Span, Spanned}; use crate::utils::{match_type, paths, span_lint, walk_ptrs_ty}; diff --git a/clippy_lints/src/overflow_check_conditional.rs b/clippy_lints/src/overflow_check_conditional.rs index cb230bc9fc5..d33ef5e05d6 100644 --- a/clippy_lints/src/overflow_check_conditional.rs +++ b/clippy_lints/src/overflow_check_conditional.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::hir::*; use crate::utils::{span_lint, SpanlessEq}; diff --git a/clippy_lints/src/panic_unimplemented.rs b/clippy_lints/src/panic_unimplemented.rs index e21c0718612..7a7fa3c456d 100644 --- a/clippy_lints/src/panic_unimplemented.rs +++ b/clippy_lints/src/panic_unimplemented.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use syntax::ast::LitKind; use syntax::ptr::P; diff --git a/clippy_lints/src/partialeq_ne_impl.rs b/clippy_lints/src/partialeq_ne_impl.rs index fe93a8bbe99..8b2e5f9c356 100644 --- a/clippy_lints/src/partialeq_ne_impl.rs +++ b/clippy_lints/src/partialeq_ne_impl.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::hir::*; use crate::utils::{is_automatically_derived, span_lint}; diff --git a/clippy_lints/src/precedence.rs b/clippy_lints/src/precedence.rs index 42bbe687832..0978a6b7d94 100644 --- a/clippy_lints/src/precedence.rs +++ b/clippy_lints/src/precedence.rs @@ -1,5 +1,5 @@ use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast::*; use syntax::source_map::Spanned; use crate::utils::{in_macro, snippet, span_lint_and_sugg}; diff --git a/clippy_lints/src/ptr.rs b/clippy_lints/src/ptr.rs index cedb6e0b26b..94bbfb0e5b9 100644 --- a/clippy_lints/src/ptr.rs +++ b/clippy_lints/src/ptr.rs @@ -4,7 +4,7 @@ use std::borrow::Cow; use rustc::hir::*; use rustc::hir::QPath; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty; use syntax::ast::NodeId; diff --git a/clippy_lints/src/question_mark.rs b/clippy_lints/src/question_mark.rs index cb98ecd3dec..3134f14b194 100644 --- a/clippy_lints/src/question_mark.rs +++ b/clippy_lints/src/question_mark.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::hir::*; use rustc::hir::def::Def; diff --git a/clippy_lints/src/ranges.rs b/clippy_lints/src/ranges.rs index bef4532bbe5..95fd14162ac 100644 --- a/clippy_lints/src/ranges.rs +++ b/clippy_lints/src/ranges.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::hir::*; use syntax::ast::RangeLimits; diff --git a/clippy_lints/src/redundant_field_names.rs b/clippy_lints/src/redundant_field_names.rs index 3021ef2dc47..579d2ad1423 100644 --- a/clippy_lints/src/redundant_field_names.rs +++ b/clippy_lints/src/redundant_field_names.rs @@ -1,5 +1,5 @@ use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast::*; use crate::utils::{span_lint_and_sugg}; diff --git a/clippy_lints/src/reference.rs b/clippy_lints/src/reference.rs index f5bc03c6d6e..98de8989597 100644 --- a/clippy_lints/src/reference.rs +++ b/clippy_lints/src/reference.rs @@ -1,6 +1,6 @@ use syntax::ast::{Expr, ExprKind, UnOp}; use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use crate::utils::{snippet, span_lint_and_sugg}; diff --git a/clippy_lints/src/regex.rs b/clippy_lints/src/regex.rs index 5fe37e16484..6ac40c5a1d2 100644 --- a/clippy_lints/src/regex.rs +++ b/clippy_lints/src/regex.rs @@ -1,7 +1,7 @@ use regex_syntax; use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use std::collections::HashSet; use syntax::ast::{LitKind, NodeId, StrStyle}; diff --git a/clippy_lints/src/replace_consts.rs b/clippy_lints/src/replace_consts.rs index 093ad0358bc..aaea8b6dd0e 100644 --- a/clippy_lints/src/replace_consts.rs +++ b/clippy_lints/src/replace_consts.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::hir; use rustc::hir::def::Def; diff --git a/clippy_lints/src/returns.rs b/clippy_lints/src/returns.rs index 694433a8b92..ddc0a9719a8 100644 --- a/clippy_lints/src/returns.rs +++ b/clippy_lints/src/returns.rs @@ -1,5 +1,5 @@ use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass, in_external_macro, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use syntax::ast; use syntax::source_map::Span; diff --git a/clippy_lints/src/serde_api.rs b/clippy_lints/src/serde_api.rs index 41d8b1f7d24..0f09988c250 100644 --- a/clippy_lints/src/serde_api.rs +++ b/clippy_lints/src/serde_api.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use crate::utils::{get_trait_def_id, paths, span_lint}; diff --git a/clippy_lints/src/shadow.rs b/clippy_lints/src/shadow.rs index 4964b7e79ef..d552c01679a 100644 --- a/clippy_lints/src/shadow.rs +++ b/clippy_lints/src/shadow.rs @@ -1,6 +1,6 @@ use crate::reexport::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass, in_external_macro, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use rustc::hir::intravisit::FnKind; use rustc::ty; diff --git a/clippy_lints/src/strings.rs b/clippy_lints/src/strings.rs index 2b915f46175..b306c18f531 100644 --- a/clippy_lints/src/strings.rs +++ b/clippy_lints/src/strings.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::source_map::Spanned; use crate::utils::SpanlessEq; use crate::utils::{get_parent_expr, is_allowed, match_type, paths, span_lint, span_lint_and_sugg, walk_ptrs_ty}; diff --git a/clippy_lints/src/suspicious_trait_impl.rs b/clippy_lints/src/suspicious_trait_impl.rs index 7e0684e7f16..9f9b279a6c5 100644 --- a/clippy_lints/src/suspicious_trait_impl.rs +++ b/clippy_lints/src/suspicious_trait_impl.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::hir; use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor}; diff --git a/clippy_lints/src/swap.rs b/clippy_lints/src/swap.rs index 7fd72cbea32..9ae6ec48383 100644 --- a/clippy_lints/src/swap.rs +++ b/clippy_lints/src/swap.rs @@ -1,7 +1,7 @@ use matches::matches; use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_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}; diff --git a/clippy_lints/src/temporary_assignment.rs b/clippy_lints/src/temporary_assignment.rs index 56e705ad0a7..cb922302964 100644 --- a/clippy_lints/src/temporary_assignment.rs +++ b/clippy_lints/src/temporary_assignment.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::{Expr, ExprKind}; use crate::utils::is_adjusted; use crate::utils::span_lint; diff --git a/clippy_lints/src/transmute.rs b/clippy_lints/src/transmute.rs index 9fe22b7dafc..6e82bee277f 100644 --- a/clippy_lints/src/transmute.rs +++ b/clippy_lints/src/transmute.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty::{self, Ty}; use rustc::hir::*; diff --git a/clippy_lints/src/trivially_copy_pass_by_ref.rs b/clippy_lints/src/trivially_copy_pass_by_ref.rs index 8f417861ca9..70a93e7f78a 100644 --- a/clippy_lints/src/trivially_copy_pass_by_ref.rs +++ b/clippy_lints/src/trivially_copy_pass_by_ref.rs @@ -5,7 +5,7 @@ use rustc::hir; use rustc::hir::*; use rustc::hir::intravisit::FnKind; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty::TyKind; use rustc::session::config::Config as SessionConfig; diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index a38d232d3e1..81842421fa3 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -3,7 +3,7 @@ use rustc::hir; use rustc::hir::*; use rustc::hir::intravisit::{walk_body, walk_expr, walk_ty, FnKind, NestedVisitorMap, Visitor}; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass, in_external_macro, LintContext}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty::{self, Ty, TyCtxt, TypeckTables}; use rustc::ty::layout::LayoutOf; diff --git a/clippy_lints/src/unicode.rs b/clippy_lints/src/unicode.rs index 4e5c9a94424..01c4cd83ce0 100644 --- a/clippy_lints/src/unicode.rs +++ b/clippy_lints/src/unicode.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use syntax::ast::{LitKind, NodeId}; use syntax::source_map::Span; diff --git a/clippy_lints/src/unsafe_removed_from_name.rs b/clippy_lints/src/unsafe_removed_from_name.rs index 753ee40be7f..7ef235e9297 100644 --- a/clippy_lints/src/unsafe_removed_from_name.rs +++ b/clippy_lints/src/unsafe_removed_from_name.rs @@ -1,5 +1,5 @@ use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast::*; use syntax::source_map::Span; use syntax::symbol::LocalInternedString; diff --git a/clippy_lints/src/unused_io_amount.rs b/clippy_lints/src/unused_io_amount.rs index e388ca93888..c5507fcaca4 100644 --- a/clippy_lints/src/unused_io_amount.rs +++ b/clippy_lints/src/unused_io_amount.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir; use crate::utils::{is_try, match_qpath, match_trait_method, paths, span_lint}; diff --git a/clippy_lints/src/unused_label.rs b/clippy_lints/src/unused_label.rs index 1fd143d6d03..71d9520c05b 100644 --- a/clippy_lints/src/unused_label.rs +++ b/clippy_lints/src/unused_label.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir; use rustc::hir::intravisit::{walk_expr, walk_fn, FnKind, NestedVisitorMap, Visitor}; use std::collections::HashMap; diff --git a/clippy_lints/src/unwrap.rs b/clippy_lints/src/unwrap.rs index 0435db93ee6..a1d24f64300 100644 --- a/clippy_lints/src/unwrap.rs +++ b/clippy_lints/src/unwrap.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use crate::utils::{in_macro, match_type, paths, span_lint_and_then, usage::is_potentially_mutated}; diff --git a/clippy_lints/src/use_self.rs b/clippy_lints/src/use_self.rs index eb2b4e801eb..550f88c895e 100644 --- a/clippy_lints/src/use_self.rs +++ b/clippy_lints/src/use_self.rs @@ -4,7 +4,7 @@ use rustc::hir::intravisit::{walk_path, walk_ty, NestedVisitorMap, Visitor}; use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; use rustc::ty; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax_pos::symbol::keywords::SelfType; /// **What it does:** Checks for unnecessary repetition of structure name when a diff --git a/clippy_lints/src/utils/author.rs b/clippy_lints/src/utils/author.rs index f45ec75aedc..fe8123d288d 100644 --- a/clippy_lints/src/utils/author.rs +++ b/clippy_lints/src/utils/author.rs @@ -4,7 +4,7 @@ #![allow(print_stdout, use_debug)] use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir; use rustc::hir::{Expr, ExprKind, QPath, TyKind, Pat, PatKind, BindingAnnotation, StmtKind, DeclKind, Stmt}; use rustc::hir::intravisit::{NestedVisitorMap, Visitor}; diff --git a/clippy_lints/src/utils/inspector.rs b/clippy_lints/src/utils/inspector.rs index 73c86d8bf67..12b4f55e432 100644 --- a/clippy_lints/src/utils/inspector.rs +++ b/clippy_lints/src/utils/inspector.rs @@ -3,7 +3,7 @@ //! checks for attributes use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir; use rustc::hir::print; use syntax::ast::Attribute; diff --git a/clippy_lints/src/utils/internal_lints.rs b/clippy_lints/src/utils/internal_lints.rs index 39a3d9b3b74..7b2d2f15996 100644 --- a/clippy_lints/src/utils/internal_lints.rs +++ b/clippy_lints/src/utils/internal_lints.rs @@ -1,5 +1,5 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass, EarlyContext, EarlyLintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use rustc::hir::*; use rustc::hir; use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor}; @@ -149,13 +149,13 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LintWithoutLintPass { fn check_crate_post(&mut self, cx: &LateContext<'a, 'tcx>, _: &'tcx Crate) { for (lint_name, &lint_span) in &self.declared_lints { - // When using the `declare_lint!` macro, the original `lint_span`'s + // When using the `declare_tool_lint!` macro, the original `lint_span`'s // file points to "". // `compiletest-rs` thinks that's an error in a different file and // just ignores it. This causes the test in compile-fail/lint_pass // not able to capture the error. // Therefore, we need to climb the macro expansion tree and find the - // actual span that invoked `declare_lint!`: + // actual span that invoked `declare_tool_lint!`: let lint_span = lint_span .ctxt() .outer() diff --git a/clippy_lints/src/vec.rs b/clippy_lints/src/vec.rs index 8e49a3d4326..4cbefc29b9c 100644 --- a/clippy_lints/src/vec.rs +++ b/clippy_lints/src/vec.rs @@ -1,6 +1,6 @@ use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::ty::{self, Ty}; use syntax::source_map::Span; diff --git a/clippy_lints/src/write.rs b/clippy_lints/src/write.rs index bc9fa09c932..5d32157238b 100644 --- a/clippy_lints/src/write.rs +++ b/clippy_lints/src/write.rs @@ -1,5 +1,5 @@ use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use syntax::ast::*; use syntax::tokenstream::{ThinTokenStream, TokenStream}; use syntax::parse::{token, parser}; diff --git a/clippy_lints/src/zero_div_zero.rs b/clippy_lints/src/zero_div_zero.rs index 77bc4802742..73c9e64d2cb 100644 --- a/clippy_lints/src/zero_div_zero.rs +++ b/clippy_lints/src/zero_div_zero.rs @@ -1,6 +1,6 @@ use crate::consts::{constant_simple, Constant}; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; -use rustc::{declare_lint, lint_array}; +use rustc::{declare_tool_lint, lint_array}; use if_chain::if_chain; use rustc::hir::*; use crate::utils::span_help_and_lint;