about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-01-27 10:56:22 +0900
committerYuki Okushi <huyuumi.dev@gmail.com>2020-01-27 11:17:58 +0900
commitf60f12f71f2060f386d9765cd60b653a58519a08 (patch)
treecb59402f5cfa744fd884c8bda0ec08a467810c09
parent4f65bec39ab7cceea9d31e7245479037e9581219 (diff)
downloadrust-f60f12f71f2060f386d9765cd60b653a58519a08.tar.gz
rust-f60f12f71f2060f386d9765cd60b653a58519a08.zip
Rename `span_help_and_lint` to `span_lint_and_help`
-rw-r--r--clippy_lints/src/as_conversions.rs4
-rw-r--r--clippy_lints/src/assertions_on_constants.rs8
-rw-r--r--clippy_lints/src/atomic_ordering.rs8
-rw-r--r--clippy_lints/src/block_in_if_condition.rs4
-rw-r--r--clippy_lints/src/cognitive_complexity.rs4
-rw-r--r--clippy_lints/src/comparison_chain.rs4
-rw-r--r--clippy_lints/src/dbg_macro.rs4
-rw-r--r--clippy_lints/src/else_if_without_else.rs4
-rw-r--r--clippy_lints/src/enum_variants.rs4
-rw-r--r--clippy_lints/src/formatting.rs4
-rw-r--r--clippy_lints/src/functions.rs4
-rw-r--r--clippy_lints/src/if_not_else.rs6
-rw-r--r--clippy_lints/src/indexing_slicing.rs4
-rw-r--r--clippy_lints/src/inherent_to_string.rs6
-rw-r--r--clippy_lints/src/integer_division.rs4
-rw-r--r--clippy_lints/src/large_stack_arrays.rs4
-rw-r--r--clippy_lints/src/let_underscore.rs6
-rw-r--r--clippy_lints/src/loops.rs6
-rw-r--r--clippy_lints/src/main_recursion.rs4
-rw-r--r--clippy_lints/src/matches.rs4
-rw-r--r--clippy_lints/src/mem_replace.rs6
-rw-r--r--clippy_lints/src/methods/mod.rs28
-rw-r--r--clippy_lints/src/misc_early.rs6
-rw-r--r--clippy_lints/src/needless_continue.rs4
-rw-r--r--clippy_lints/src/regex.rs6
-rw-r--r--clippy_lints/src/trait_bounds.rs4
-rw-r--r--clippy_lints/src/types.rs8
-rw-r--r--clippy_lints/src/unused_self.rs4
-rw-r--r--clippy_lints/src/utils/diagnostics.rs2
-rw-r--r--clippy_lints/src/utils/internal_lints.rs6
-rw-r--r--clippy_lints/src/zero_div_zero.rs4
-rw-r--r--doc/adding_lints.md6
32 files changed, 90 insertions, 90 deletions
diff --git a/clippy_lints/src/as_conversions.rs b/clippy_lints/src/as_conversions.rs
index b4b02510ce7..d90a0d67d5a 100644
--- a/clippy_lints/src/as_conversions.rs
+++ b/clippy_lints/src/as_conversions.rs
@@ -3,7 +3,7 @@ use rustc_lint::{EarlyContext, EarlyLintPass, LintContext};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
 use syntax::ast::*;
 
-use crate::utils::span_help_and_lint;
+use crate::utils::span_lint_and_help;
 
 declare_clippy_lint! {
     /// **What it does:** Checks for usage of `as` conversions.
@@ -45,7 +45,7 @@ impl EarlyLintPass for AsConversions {
         }
 
         if let ExprKind::Cast(_, _) = expr.kind {
-            span_help_and_lint(
+            span_lint_and_help(
                 cx,
                 AS_CONVERSIONS,
                 expr.span,
diff --git a/clippy_lints/src/assertions_on_constants.rs b/clippy_lints/src/assertions_on_constants.rs
index b13f2573923..e399229b43c 100644
--- a/clippy_lints/src/assertions_on_constants.rs
+++ b/clippy_lints/src/assertions_on_constants.rs
@@ -1,6 +1,6 @@
 use crate::consts::{constant, Constant};
 use crate::utils::paths;
-use crate::utils::{is_direct_expn_of, is_expn_of, match_function_call, snippet_opt, span_help_and_lint};
+use crate::utils::{is_direct_expn_of, is_expn_of, match_function_call, snippet_opt, span_lint_and_help};
 use if_chain::if_chain;
 use rustc_hir::*;
 use rustc_lint::{LateContext, LateLintPass};
@@ -34,7 +34,7 @@ declare_lint_pass!(AssertionsOnConstants => [ASSERTIONS_ON_CONSTANTS]);
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssertionsOnConstants {
     fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr<'_>) {
         let lint_true = |is_debug: bool| {
-            span_help_and_lint(
+            span_lint_and_help(
                 cx,
                 ASSERTIONS_ON_CONSTANTS,
                 e.span,
@@ -47,7 +47,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssertionsOnConstants {
             );
         };
         let lint_false_without_message = || {
-            span_help_and_lint(
+            span_lint_and_help(
                 cx,
                 ASSERTIONS_ON_CONSTANTS,
                 e.span,
@@ -56,7 +56,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssertionsOnConstants {
             );
         };
         let lint_false_with_message = |panic_message: String| {
-            span_help_and_lint(
+            span_lint_and_help(
                 cx,
                 ASSERTIONS_ON_CONSTANTS,
                 e.span,
diff --git a/clippy_lints/src/atomic_ordering.rs b/clippy_lints/src/atomic_ordering.rs
index 0dab0c9cc4f..178ee45298e 100644
--- a/clippy_lints/src/atomic_ordering.rs
+++ b/clippy_lints/src/atomic_ordering.rs
@@ -1,4 +1,4 @@
-use crate::utils::{match_def_path, span_help_and_lint};
+use crate::utils::{match_def_path, span_lint_and_help};
 use if_chain::if_chain;
 use rustc::ty;
 use rustc_hir::def_id::DefId;
@@ -80,7 +80,7 @@ fn check_atomic_load_store(cx: &LateContext<'_, '_>, expr: &Expr<'_>) {
         then {
             if method == "load" &&
                 match_ordering_def_path(cx, ordering_def_id, &["Release", "AcqRel"]) {
-                span_help_and_lint(
+                span_lint_and_help(
                     cx,
                     INVALID_ATOMIC_ORDERING,
                     ordering_arg.span,
@@ -89,7 +89,7 @@ fn check_atomic_load_store(cx: &LateContext<'_, '_>, expr: &Expr<'_>) {
                 );
             } else if method == "store" &&
                 match_ordering_def_path(cx, ordering_def_id, &["Acquire", "AcqRel"]) {
-                span_help_and_lint(
+                span_lint_and_help(
                     cx,
                     INVALID_ATOMIC_ORDERING,
                     ordering_arg.span,
@@ -113,7 +113,7 @@ fn check_memory_fence(cx: &LateContext<'_, '_>, expr: &Expr<'_>) {
         if let Some(ordering_def_id) = cx.tables.qpath_res(ordering_qpath, args[0].hir_id).opt_def_id();
         if match_ordering_def_path(cx, ordering_def_id, &["Relaxed"]);
         then {
-            span_help_and_lint(
+            span_lint_and_help(
                 cx,
                 INVALID_ATOMIC_ORDERING,
                 args[0].span,
diff --git a/clippy_lints/src/block_in_if_condition.rs b/clippy_lints/src/block_in_if_condition.rs
index e1653082736..5a64e444136 100644
--- a/clippy_lints/src/block_in_if_condition.rs
+++ b/clippy_lints/src/block_in_if_condition.rs
@@ -89,7 +89,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlockInIfCondition {
                             if expr.span.from_expansion() || differing_macro_contexts(expr.span, ex.span) {
                                 return;
                             }
-                            span_help_and_lint(
+                            span_lint_and_help(
                                 cx,
                                 BLOCK_IN_IF_CONDITION_EXPR,
                                 check.span,
@@ -107,7 +107,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlockInIfCondition {
                             return;
                         }
                         // move block higher
-                        span_help_and_lint(
+                        span_lint_and_help(
                             cx,
                             BLOCK_IN_IF_CONDITION_STMT,
                             check.span,
diff --git a/clippy_lints/src/cognitive_complexity.rs b/clippy_lints/src/cognitive_complexity.rs
index f1eb64c8ccb..2b631525501 100644
--- a/clippy_lints/src/cognitive_complexity.rs
+++ b/clippy_lints/src/cognitive_complexity.rs
@@ -9,7 +9,7 @@ use rustc_span::source_map::Span;
 use rustc_span::BytePos;
 use syntax::ast::Attribute;
 
-use crate::utils::{match_type, paths, snippet_opt, span_help_and_lint, LimitStack};
+use crate::utils::{match_type, paths, snippet_opt, span_lint_and_help, LimitStack};
 
 declare_clippy_lint! {
     /// **What it does:** Checks for methods with high cognitive complexity.
@@ -96,7 +96,7 @@ impl CognitiveComplexity {
                 },
             };
 
-            span_help_and_lint(
+            span_lint_and_help(
                 cx,
                 COGNITIVE_COMPLEXITY,
                 fn_span,
diff --git a/clippy_lints/src/comparison_chain.rs b/clippy_lints/src/comparison_chain.rs
index d3a3b85b331..684d3448ea4 100644
--- a/clippy_lints/src/comparison_chain.rs
+++ b/clippy_lints/src/comparison_chain.rs
@@ -1,5 +1,5 @@
 use crate::utils::{
-    get_trait_def_id, if_sequence, implements_trait, parent_node_is_if_expr, paths, span_help_and_lint, SpanlessEq,
+    get_trait_def_id, if_sequence, implements_trait, parent_node_is_if_expr, paths, span_lint_and_help, SpanlessEq,
 };
 use rustc_hir::*;
 use rustc_lint::{LateContext, LateLintPass};
@@ -99,7 +99,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ComparisonChain {
                 return;
             }
         }
-        span_help_and_lint(
+        span_lint_and_help(
             cx,
             COMPARISON_CHAIN,
             expr.span,
diff --git a/clippy_lints/src/dbg_macro.rs b/clippy_lints/src/dbg_macro.rs
index 0d3067f15c7..eb785e4c3cb 100644
--- a/clippy_lints/src/dbg_macro.rs
+++ b/clippy_lints/src/dbg_macro.rs
@@ -1,4 +1,4 @@
-use crate::utils::{snippet_opt, span_help_and_lint, span_lint_and_sugg};
+use crate::utils::{snippet_opt, span_lint_and_help, span_lint_and_sugg};
 use rustc_errors::Applicability;
 use rustc_lint::{EarlyContext, EarlyLintPass};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
@@ -43,7 +43,7 @@ impl EarlyLintPass for DbgMacro {
                     Applicability::MaybeIncorrect,
                 );
             } else {
-                span_help_and_lint(
+                span_lint_and_help(
                     cx,
                     DBG_MACRO,
                     mac.span(),
diff --git a/clippy_lints/src/else_if_without_else.rs b/clippy_lints/src/else_if_without_else.rs
index 5360b2e086f..b87900180f2 100644
--- a/clippy_lints/src/else_if_without_else.rs
+++ b/clippy_lints/src/else_if_without_else.rs
@@ -5,7 +5,7 @@ use rustc_lint::{EarlyContext, EarlyLintPass, LintContext};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
 use syntax::ast::*;
 
-use crate::utils::span_help_and_lint;
+use crate::utils::span_lint_and_help;
 
 declare_clippy_lint! {
     /// **What it does:** Checks for usage of if expressions with an `else if` branch,
@@ -56,7 +56,7 @@ impl EarlyLintPass for ElseIfWithoutElse {
 
         while let ExprKind::If(_, _, Some(ref els)) = item.kind {
             if let ExprKind::If(_, _, None) = els.kind {
-                span_help_and_lint(
+                span_lint_and_help(
                     cx,
                     ELSE_IF_WITHOUT_ELSE,
                     els.span,
diff --git a/clippy_lints/src/enum_variants.rs b/clippy_lints/src/enum_variants.rs
index 2275a3dc6cb..75205f96400 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 crate::utils::{camel_case, is_present_in_source};
-use crate::utils::{span_help_and_lint, span_lint};
+use crate::utils::{span_lint, span_lint_and_help};
 use rustc_lint::{EarlyContext, EarlyLintPass, Lint};
 use rustc_session::{declare_tool_lint, impl_lint_pass};
 use rustc_span::source_map::Span;
@@ -201,7 +201,7 @@ fn check_variant(
         (false, _) => ("pre", pre),
         (true, false) => ("post", post),
     };
-    span_help_and_lint(
+    span_lint_and_help(
         cx,
         lint,
         span,
diff --git a/clippy_lints/src/formatting.rs b/clippy_lints/src/formatting.rs
index fed87f26be0..b5f98cb92e6 100644
--- a/clippy_lints/src/formatting.rs
+++ b/clippy_lints/src/formatting.rs
@@ -1,4 +1,4 @@
-use crate::utils::{differing_macro_contexts, snippet_opt, span_help_and_lint, span_note_and_lint};
+use crate::utils::{differing_macro_contexts, snippet_opt, span_lint_and_help, span_note_and_lint};
 use if_chain::if_chain;
 use rustc::lint::in_external_macro;
 use rustc_lint::{EarlyContext, EarlyLintPass};
@@ -178,7 +178,7 @@ fn check_unop(cx: &EarlyContext<'_>, expr: &Expr) {
         then {
             let unop_str = UnOp::to_string(op);
             let eqop_span = lhs.span.between(un_rhs.span);
-            span_help_and_lint(
+            span_lint_and_help(
                 cx,
                 SUSPICIOUS_UNARY_OP_FORMATTING,
                 eqop_span,
diff --git a/clippy_lints/src/functions.rs b/clippy_lints/src/functions.rs
index 5a5431f47a0..6d71ccbc852 100644
--- a/clippy_lints/src/functions.rs
+++ b/clippy_lints/src/functions.rs
@@ -1,6 +1,6 @@
 use crate::utils::{
     attr_by_name, attrs::is_proc_macro, is_must_use_ty, iter_input_pats, match_def_path, must_use_attr, qpath_res,
-    return_ty, snippet, snippet_opt, span_help_and_lint, span_lint, span_lint_and_then, trait_ref_of_method,
+    return_ty, snippet, snippet_opt, span_lint, span_lint_and_help, span_lint_and_then, trait_ref_of_method,
     type_is_unsafe_function,
 };
 use matches::matches;
@@ -433,7 +433,7 @@ fn check_needless_must_use(
             },
         );
     } else if !attr.is_value_str() && is_must_use_ty(cx, return_ty(cx, item_id)) {
-        span_help_and_lint(
+        span_lint_and_help(
             cx,
             DOUBLE_MUST_USE,
             fn_header_span,
diff --git a/clippy_lints/src/if_not_else.rs b/clippy_lints/src/if_not_else.rs
index 760a00801c6..8deed214203 100644
--- a/clippy_lints/src/if_not_else.rs
+++ b/clippy_lints/src/if_not_else.rs
@@ -6,7 +6,7 @@ use rustc_lint::{EarlyContext, EarlyLintPass, LintContext};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
 use syntax::ast::*;
 
-use crate::utils::span_help_and_lint;
+use crate::utils::span_lint_and_help;
 
 declare_clippy_lint! {
     /// **What it does:** Checks for usage of `!` or `!=` in an if condition with an
@@ -56,7 +56,7 @@ impl EarlyLintPass for IfNotElse {
             if let ExprKind::Block(..) = els.kind {
                 match cond.kind {
                     ExprKind::Unary(UnOp::Not, _) => {
-                        span_help_and_lint(
+                        span_lint_and_help(
                             cx,
                             IF_NOT_ELSE,
                             item.span,
@@ -65,7 +65,7 @@ impl EarlyLintPass for IfNotElse {
                         );
                     },
                     ExprKind::Binary(ref kind, _, _) if kind.node == BinOpKind::Ne => {
-                        span_help_and_lint(
+                        span_lint_and_help(
                             cx,
                             IF_NOT_ELSE,
                             item.span,
diff --git a/clippy_lints/src/indexing_slicing.rs b/clippy_lints/src/indexing_slicing.rs
index 65fc29a131f..30bb09fd808 100644
--- a/clippy_lints/src/indexing_slicing.rs
+++ b/clippy_lints/src/indexing_slicing.rs
@@ -136,7 +136,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for IndexingSlicing {
                     (None, None) => return, // [..] is ok.
                 };
 
-                utils::span_help_and_lint(cx, INDEXING_SLICING, expr.span, "slicing may panic.", help_msg);
+                utils::span_lint_and_help(cx, INDEXING_SLICING, expr.span, "slicing may panic.", help_msg);
             } else {
                 // Catchall non-range index, i.e., [n] or [n << m]
                 if let ty::Array(..) = ty.kind {
@@ -147,7 +147,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for IndexingSlicing {
                     }
                 }
 
-                utils::span_help_and_lint(
+                utils::span_lint_and_help(
                     cx,
                     INDEXING_SLICING,
                     expr.span,
diff --git a/clippy_lints/src/inherent_to_string.rs b/clippy_lints/src/inherent_to_string.rs
index 818168f7f1c..10fe8f28eab 100644
--- a/clippy_lints/src/inherent_to_string.rs
+++ b/clippy_lints/src/inherent_to_string.rs
@@ -4,7 +4,7 @@ use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
 
 use crate::utils::{
-    get_trait_def_id, implements_trait, match_type, paths, return_ty, span_help_and_lint, trait_ref_of_method,
+    get_trait_def_id, implements_trait, match_type, paths, return_ty, span_lint_and_help, trait_ref_of_method,
     walk_ptrs_ty,
 };
 
@@ -130,7 +130,7 @@ fn show_lint(cx: &LateContext<'_, '_>, item: &ImplItem<'_>) {
 
     // Emit either a warning or an error
     if implements_trait(cx, self_type, display_trait_id, &[]) {
-        span_help_and_lint(
+        span_lint_and_help(
             cx,
             INHERENT_TO_STRING_SHADOW_DISPLAY,
             item.span,
@@ -141,7 +141,7 @@ fn show_lint(cx: &LateContext<'_, '_>, item: &ImplItem<'_>) {
             &format!("remove the inherent method from type `{}`", self_type.to_string())
         );
     } else {
-        span_help_and_lint(
+        span_lint_and_help(
             cx,
             INHERENT_TO_STRING,
             item.span,
diff --git a/clippy_lints/src/integer_division.rs b/clippy_lints/src/integer_division.rs
index e3614ace3d6..053d66e6af7 100644
--- a/clippy_lints/src/integer_division.rs
+++ b/clippy_lints/src/integer_division.rs
@@ -1,4 +1,4 @@
-use crate::utils::span_help_and_lint;
+use crate::utils::span_lint_and_help;
 use if_chain::if_chain;
 use rustc_hir as hir;
 use rustc_lint::{LateContext, LateLintPass};
@@ -30,7 +30,7 @@ declare_lint_pass!(IntegerDivision => [INTEGER_DIVISION]);
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for IntegerDivision {
     fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr<'_>) {
         if is_integer_division(cx, expr) {
-            span_help_and_lint(
+            span_lint_and_help(
                 cx,
                 INTEGER_DIVISION,
                 expr.span,
diff --git a/clippy_lints/src/large_stack_arrays.rs b/clippy_lints/src/large_stack_arrays.rs
index 18ddb714dbf..aa394c85e30 100644
--- a/clippy_lints/src/large_stack_arrays.rs
+++ b/clippy_lints/src/large_stack_arrays.rs
@@ -7,7 +7,7 @@ use rustc_session::{declare_tool_lint, impl_lint_pass};
 use if_chain::if_chain;
 
 use crate::rustc_target::abi::LayoutOf;
-use crate::utils::{snippet, span_help_and_lint};
+use crate::utils::{snippet, span_lint_and_help};
 
 declare_clippy_lint! {
     /// **What it does:** Checks for local arrays that may be too large.
@@ -49,7 +49,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LargeStackArrays {
             if let Ok(element_size) = cx.layout_of(element_type).map(|l| l.size.bytes());
             if self.maximum_allowed_size < element_count * element_size;
             then {
-                span_help_and_lint(
+                span_lint_and_help(
                     cx,
                     LARGE_STACK_ARRAYS,
                     expr.span,
diff --git a/clippy_lints/src/let_underscore.rs b/clippy_lints/src/let_underscore.rs
index c257b22df38..2df3cccb83b 100644
--- a/clippy_lints/src/let_underscore.rs
+++ b/clippy_lints/src/let_underscore.rs
@@ -4,7 +4,7 @@ use rustc_hir::*;
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
 
-use crate::utils::{is_must_use_func_call, is_must_use_ty, span_help_and_lint};
+use crate::utils::{is_must_use_func_call, is_must_use_ty, span_lint_and_help};
 
 declare_clippy_lint! {
     /// **What it does:** Checks for `let _ = <expr>`
@@ -44,7 +44,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LetUnderscore {
             if let Some(ref init) = local.init;
             then {
                 if is_must_use_ty(cx, cx.tables.expr_ty(init)) {
-                   span_help_and_lint(
+                   span_lint_and_help(
                         cx,
                         LET_UNDERSCORE_MUST_USE,
                         stmt.span,
@@ -52,7 +52,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LetUnderscore {
                         "consider explicitly using expression value"
                     )
                 } else if is_must_use_func_call(cx, init) {
-                    span_help_and_lint(
+                    span_lint_and_help(
                         cx,
                         LET_UNDERSCORE_MUST_USE,
                         stmt.span,
diff --git a/clippy_lints/src/loops.rs b/clippy_lints/src/loops.rs
index 3f0fa6eebc6..1aea630efe4 100644
--- a/clippy_lints/src/loops.rs
+++ b/clippy_lints/src/loops.rs
@@ -5,7 +5,7 @@ use crate::utils::usage::{is_unused, mutated_variables};
 use crate::utils::{
     get_enclosing_block, get_parent_expr, get_trait_def_id, has_iter_method, higher, implements_trait,
     is_integer_const, is_no_std_crate, is_refutable, last_path_segment, match_trait_method, match_type, match_var,
-    multispan_sugg, snippet, snippet_opt, snippet_with_applicability, span_help_and_lint, span_lint,
+    multispan_sugg, snippet, snippet_opt, snippet_with_applicability, span_lint, span_lint_and_help,
     span_lint_and_sugg, span_lint_and_then, SpanlessEq,
 };
 use crate::utils::{is_type_diagnostic_item, qpath_res, same_tys, sext, sugg};
@@ -1390,7 +1390,7 @@ fn check_for_loop_arg(cx: &LateContext<'_, '_>, pat: &Pat<'_>, arg: &Expr<'_>, e
 fn check_arg_type(cx: &LateContext<'_, '_>, pat: &Pat<'_>, arg: &Expr<'_>) {
     let ty = cx.tables.expr_ty(arg);
     if match_type(cx, ty, &paths::OPTION) {
-        span_help_and_lint(
+        span_lint_and_help(
             cx,
             FOR_LOOP_OVER_OPTION,
             arg.span,
@@ -1406,7 +1406,7 @@ fn check_arg_type(cx: &LateContext<'_, '_>, pat: &Pat<'_>, arg: &Expr<'_>) {
             ),
         );
     } else if match_type(cx, ty, &paths::RESULT) {
-        span_help_and_lint(
+        span_lint_and_help(
             cx,
             FOR_LOOP_OVER_RESULT,
             arg.span,
diff --git a/clippy_lints/src/main_recursion.rs b/clippy_lints/src/main_recursion.rs
index 2d21aeaeec4..7854873509e 100644
--- a/clippy_lints/src/main_recursion.rs
+++ b/clippy_lints/src/main_recursion.rs
@@ -2,7 +2,7 @@ use rustc_hir::{Crate, Expr, ExprKind, QPath};
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_tool_lint, impl_lint_pass};
 
-use crate::utils::{is_entrypoint_fn, is_no_std_crate, snippet, span_help_and_lint};
+use crate::utils::{is_entrypoint_fn, is_no_std_crate, snippet, span_lint_and_help};
 use if_chain::if_chain;
 
 declare_clippy_lint! {
@@ -48,7 +48,7 @@ impl LateLintPass<'_, '_> for MainRecursion {
             if let Some(def_id) = path.res.opt_def_id();
             if is_entrypoint_fn(cx, def_id);
             then {
-                span_help_and_lint(
+                span_lint_and_help(
                     cx,
                     MAIN_RECURSION,
                     func.span,
diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs
index cddd479d7b7..119a47a6b8c 100644
--- a/clippy_lints/src/matches.rs
+++ b/clippy_lints/src/matches.rs
@@ -4,7 +4,7 @@ use crate::utils::sugg::Sugg;
 use crate::utils::usage::is_unused;
 use crate::utils::{
     expr_block, is_allowed, is_expn_of, is_wild, match_qpath, match_type, multispan_sugg, remove_blocks, snippet,
-    snippet_with_applicability, span_help_and_lint, span_lint_and_sugg, span_lint_and_then, span_note_and_lint,
+    snippet_with_applicability, span_lint_and_help, span_lint_and_sugg, span_lint_and_then, span_note_and_lint,
     walk_ptrs_ty,
 };
 use if_chain::if_chain;
@@ -700,7 +700,7 @@ fn check_wild_in_or_pats(cx: &LateContext<'_, '_>, arms: &[Arm<'_>]) {
         if let PatKind::Or(ref fields) = arm.pat.kind {
             // look for multiple fields in this arm that contains at least one Wild pattern
             if fields.len() > 1 && fields.iter().any(is_wild) {
-                span_help_and_lint(
+                span_lint_and_help(
                     cx,
                     WILDCARD_IN_OR_PATTERNS,
                     arm.pat.span,
diff --git a/clippy_lints/src/mem_replace.rs b/clippy_lints/src/mem_replace.rs
index 3ae5863d699..d2b1fd3a9e6 100644
--- a/clippy_lints/src/mem_replace.rs
+++ b/clippy_lints/src/mem_replace.rs
@@ -1,5 +1,5 @@
 use crate::utils::{
-    in_macro, match_def_path, match_qpath, paths, snippet, snippet_with_applicability, span_help_and_lint,
+    in_macro, match_def_path, match_qpath, paths, snippet, snippet_with_applicability, span_lint_and_help,
     span_lint_and_sugg, span_lint_and_then,
 };
 use if_chain::if_chain;
@@ -142,7 +142,7 @@ fn check_replace_with_uninit(cx: &LateContext<'_, '_>, src: &Expr<'_>, expr_span
             if let Some(repl_def_id) = cx.tables.qpath_res(repl_func_qpath, repl_func.hir_id).opt_def_id();
             then {
                 if match_def_path(cx, repl_def_id, &paths::MEM_UNINITIALIZED) {
-                    span_help_and_lint(
+                    span_lint_and_help(
                         cx,
                         MEM_REPLACE_WITH_UNINIT,
                         expr_span,
@@ -151,7 +151,7 @@ fn check_replace_with_uninit(cx: &LateContext<'_, '_>, src: &Expr<'_>, expr_span
                     );
                 } else if match_def_path(cx, repl_def_id, &paths::MEM_ZEROED) &&
                         !cx.tables.expr_ty(src).is_primitive() {
-                    span_help_and_lint(
+                    span_lint_and_help(
                         cx,
                         MEM_REPLACE_WITH_UNINIT,
                         expr_span,
diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs
index eafc2c61821..c15ef05c3a4 100644
--- a/clippy_lints/src/methods/mod.rs
+++ b/clippy_lints/src/methods/mod.rs
@@ -28,7 +28,7 @@ use crate::utils::{
     is_ctor_or_promotable_const_function, is_expn_of, is_type_diagnostic_item, iter_input_pats, last_path_segment,
     match_def_path, match_qpath, match_trait_method, match_type, match_var, method_calls, method_chain_args, paths,
     remove_blocks, return_ty, same_tys, single_segment_path, snippet, snippet_with_applicability,
-    snippet_with_macro_callsite, span_help_and_lint, span_lint, span_lint_and_sugg, span_lint_and_then,
+    snippet_with_macro_callsite, span_lint, span_lint_and_help, span_lint_and_sugg, span_lint_and_then,
     span_note_and_lint, sugg, walk_ptrs_ty, walk_ptrs_ty_depth, SpanlessEq,
 };
 
@@ -2133,7 +2133,7 @@ fn lint_iter_nth<'a, 'tcx>(
         return; // caller is not a type that we want to lint
     };
 
-    span_help_and_lint(
+    span_lint_and_help(
         cx,
         ITER_NTH,
         expr.span,
@@ -2242,7 +2242,7 @@ fn lint_get_unwrap<'a, 'tcx>(
 fn lint_iter_skip_next(cx: &LateContext<'_, '_>, expr: &hir::Expr<'_>) {
     // lint if caller of skip is an Iterator
     if match_trait_method(cx, expr, &paths::ITERATOR) {
-        span_help_and_lint(
+        span_lint_and_help(
             cx,
             ITER_SKIP_NEXT,
             expr.span,
@@ -2303,7 +2303,7 @@ fn lint_unwrap(cx: &LateContext<'_, '_>, expr: &hir::Expr<'_>, unwrap_args: &[hi
     };
 
     if let Some((lint, kind, none_value)) = mess {
-        span_help_and_lint(
+        span_lint_and_help(
             cx,
             lint,
             expr.span,
@@ -2330,7 +2330,7 @@ fn lint_expect(cx: &LateContext<'_, '_>, expr: &hir::Expr<'_>, expect_args: &[hi
     };
 
     if let Some((lint, kind, none_value)) = mess {
-        span_help_and_lint(
+        span_lint_and_help(
             cx,
             lint,
             expr.span,
@@ -2350,7 +2350,7 @@ fn lint_ok_expect(cx: &LateContext<'_, '_>, expr: &hir::Expr<'_>, ok_args: &[hir
         if has_debug_impl(error_type, cx);
 
         then {
-            span_help_and_lint(
+            span_lint_and_help(
                 cx,
                 OK_EXPECT,
                 expr.span,
@@ -2588,7 +2588,7 @@ fn lint_skip_while_next<'a, 'tcx>(
 ) {
     // lint if caller of `.skip_while().next()` is an Iterator
     if match_trait_method(cx, expr, &paths::ITERATOR) {
-        span_help_and_lint(
+        span_lint_and_help(
             cx,
             SKIP_WHILE_NEXT,
             expr.span,
@@ -2609,7 +2609,7 @@ fn lint_filter_map<'a, 'tcx>(
     if match_trait_method(cx, expr, &paths::ITERATOR) {
         let msg = "called `filter(p).map(q)` on an `Iterator`";
         let hint = "this is more succinctly expressed by calling `.filter_map(..)` instead";
-        span_help_and_lint(cx, FILTER_MAP, expr.span, msg, hint);
+        span_lint_and_help(cx, FILTER_MAP, expr.span, msg, hint);
     }
 }
 
@@ -2649,7 +2649,7 @@ fn lint_find_map<'a, 'tcx>(
     if match_trait_method(cx, &map_args[0], &paths::ITERATOR) {
         let msg = "called `find(p).map(q)` on an `Iterator`";
         let hint = "this is more succinctly expressed by calling `.find_map(..)` instead";
-        span_help_and_lint(cx, FIND_MAP, expr.span, msg, hint);
+        span_lint_and_help(cx, FIND_MAP, expr.span, msg, hint);
     }
 }
 
@@ -2664,7 +2664,7 @@ fn lint_filter_map_map<'a, 'tcx>(
     if match_trait_method(cx, expr, &paths::ITERATOR) {
         let msg = "called `filter_map(p).map(q)` on an `Iterator`";
         let hint = "this is more succinctly expressed by only calling `.filter_map(..)` instead";
-        span_help_and_lint(cx, FILTER_MAP, expr.span, msg, hint);
+        span_lint_and_help(cx, FILTER_MAP, expr.span, msg, hint);
     }
 }
 
@@ -2680,7 +2680,7 @@ fn lint_filter_flat_map<'a, 'tcx>(
         let msg = "called `filter(p).flat_map(q)` on an `Iterator`";
         let hint = "this is more succinctly expressed by calling `.flat_map(..)` \
             and filtering by returning `iter::empty()`";
-        span_help_and_lint(cx, FILTER_MAP, expr.span, msg, hint);
+        span_lint_and_help(cx, FILTER_MAP, expr.span, msg, hint);
     }
 }
 
@@ -2696,7 +2696,7 @@ fn lint_filter_map_flat_map<'a, 'tcx>(
         let msg = "called `filter_map(p).flat_map(q)` on an `Iterator`";
         let hint = "this is more succinctly expressed by calling `.flat_map(..)` \
             and filtering by returning `iter::empty()`";
-        span_help_and_lint(cx, FILTER_MAP, expr.span, msg, hint);
+        span_lint_and_help(cx, FILTER_MAP, expr.span, msg, hint);
     }
 }
 
@@ -3077,7 +3077,7 @@ fn is_maybe_uninit_ty_valid(cx: &LateContext<'_, '_>, ty: Ty<'_>) -> bool {
 }
 
 fn lint_suspicious_map(cx: &LateContext<'_, '_>, expr: &hir::Expr<'_>) {
-    span_help_and_lint(
+    span_lint_and_help(
         cx,
         SUSPICIOUS_MAP,
         expr.span,
@@ -3436,5 +3436,5 @@ fn lint_filetype_is_file(cx: &LateContext<'_, '_>, expr: &hir::Expr<'_>, args: &
     }
     let lint_msg = format!("`{}FileType::is_file()` only {} regular files", lint_unary, verb);
     let help_msg = format!("use `{}FileType::is_dir()` instead", help_unary);
-    span_help_and_lint(cx, FILETYPE_IS_FILE, span, &lint_msg, &help_msg);
+    span_lint_and_help(cx, FILETYPE_IS_FILE, span, &lint_msg, &help_msg);
 }
diff --git a/clippy_lints/src/misc_early.rs b/clippy_lints/src/misc_early.rs
index 12b5d4aa122..4629a53025c 100644
--- a/clippy_lints/src/misc_early.rs
+++ b/clippy_lints/src/misc_early.rs
@@ -1,5 +1,5 @@
 use crate::utils::{
-    constants, snippet_opt, snippet_with_applicability, span_help_and_lint, span_lint, span_lint_and_sugg,
+    constants, snippet_opt, snippet_with_applicability, span_lint, span_lint_and_help, span_lint_and_sugg,
     span_lint_and_then,
 };
 use if_chain::if_chain;
@@ -305,7 +305,7 @@ impl EarlyLintPass for MiscEarlyLints {
                 }
             }
             if !pfields.is_empty() && wilds == pfields.len() {
-                span_help_and_lint(
+                span_lint_and_help(
                     cx,
                     UNNEEDED_FIELD_PATTERN,
                     pat.span,
@@ -338,7 +338,7 @@ impl EarlyLintPass for MiscEarlyLints {
                                 "You matched a field with a wildcard pattern. Consider using `..` instead",
                             );
                         } else {
-                            span_help_and_lint(
+                            span_lint_and_help(
                                 cx,
                                 UNNEEDED_FIELD_PATTERN,
                                 field.span,
diff --git a/clippy_lints/src/needless_continue.rs b/clippy_lints/src/needless_continue.rs
index 7bf667f4bc6..ac14b113cc5 100644
--- a/clippy_lints/src/needless_continue.rs
+++ b/clippy_lints/src/needless_continue.rs
@@ -39,7 +39,7 @@ use rustc_span::source_map::{original_sp, DUMMY_SP};
 use std::borrow::Cow;
 use syntax::ast;
 
-use crate::utils::{snippet, snippet_block, span_help_and_lint, trim_multiline};
+use crate::utils::{snippet, snippet_block, span_lint_and_help, trim_multiline};
 
 declare_clippy_lint! {
     /// **What it does:** The lint checks for `if`-statements appearing in loops
@@ -300,7 +300,7 @@ fn emit_warning<'a>(ctx: &EarlyContext<'_>, data: &'a LintData<'_>, header: &str
             data.if_expr,
         ),
     };
-    span_help_and_lint(ctx, NEEDLESS_CONTINUE, expr.span, message, &snip);
+    span_lint_and_help(ctx, NEEDLESS_CONTINUE, expr.span, message, &snip);
 }
 
 fn suggestion_snippet_for_continue_inside_if<'a>(
diff --git a/clippy_lints/src/regex.rs b/clippy_lints/src/regex.rs
index bd09905a9b7..5de0e441367 100644
--- a/clippy_lints/src/regex.rs
+++ b/clippy_lints/src/regex.rs
@@ -1,5 +1,5 @@
 use crate::consts::{constant, Constant};
-use crate::utils::{is_expn_of, match_def_path, match_type, paths, span_help_and_lint, span_lint};
+use crate::utils::{is_expn_of, match_def_path, match_type, paths, span_lint, span_lint_and_help};
 use if_chain::if_chain;
 use rustc_data_structures::fx::FxHashSet;
 use rustc_hir::*;
@@ -208,7 +208,7 @@ fn check_regex<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>, utf8:
             match parser.parse(r) {
                 Ok(r) => {
                     if let Some(repl) = is_trivial_regex(&r) {
-                        span_help_and_lint(cx, TRIVIAL_REGEX, expr.span, "trivial regex", repl);
+                        span_lint_and_help(cx, TRIVIAL_REGEX, expr.span, "trivial regex", repl);
                     }
                 },
                 Err(regex_syntax::Error::Parse(e)) => {
@@ -236,7 +236,7 @@ fn check_regex<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>, utf8:
         match parser.parse(&r) {
             Ok(r) => {
                 if let Some(repl) = is_trivial_regex(&r) {
-                    span_help_and_lint(cx, TRIVIAL_REGEX, expr.span, "trivial regex", repl);
+                    span_lint_and_help(cx, TRIVIAL_REGEX, expr.span, "trivial regex", repl);
                 }
             },
             Err(regex_syntax::Error::Parse(e)) => {
diff --git a/clippy_lints/src/trait_bounds.rs b/clippy_lints/src/trait_bounds.rs
index 4c46ebd703c..858b505712d 100644
--- a/clippy_lints/src/trait_bounds.rs
+++ b/clippy_lints/src/trait_bounds.rs
@@ -1,4 +1,4 @@
-use crate::utils::{in_macro, snippet, span_help_and_lint, SpanlessHash};
+use crate::utils::{in_macro, snippet, span_lint_and_help, SpanlessHash};
 use rustc_data_structures::fx::FxHashMap;
 use rustc_hir::*;
 use rustc_lint::{LateContext, LateLintPass};
@@ -63,7 +63,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TraitBounds {
                     }
                     hint_string.truncate(hint_string.len() - 2);
                     hint_string.push('`');
-                    span_help_and_lint(
+                    span_lint_and_help(
                         cx,
                         TYPE_REPETITION_IN_BOUNDS,
                         p.span,
diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs
index b271b58d903..4fcf39d2142 100644
--- a/clippy_lints/src/types.rs
+++ b/clippy_lints/src/types.rs
@@ -27,7 +27,7 @@ use crate::utils::paths;
 use crate::utils::{
     clip, comparisons, differing_macro_contexts, higher, in_constant, int_bits, last_path_segment, match_def_path,
     match_path, method_chain_args, multispan_sugg, qpath_res, same_tys, sext, snippet, snippet_opt,
-    snippet_with_applicability, snippet_with_macro_callsite, span_help_and_lint, span_lint, span_lint_and_sugg,
+    snippet_with_applicability, snippet_with_macro_callsite, span_lint, span_lint_and_help, span_lint_and_sugg,
     span_lint_and_then, unsext,
 };
 
@@ -264,7 +264,7 @@ impl Types {
                 if let Some(def_id) = res.opt_def_id() {
                     if Some(def_id) == cx.tcx.lang_items().owned_box() {
                         if match_type_parameter(cx, qpath, &paths::VEC) {
-                            span_help_and_lint(
+                            span_lint_and_help(
                                 cx,
                                 BOX_VEC,
                                 hir_ty.span,
@@ -321,7 +321,7 @@ impl Types {
                             return; // don't recurse into the type
                         }
                     } else if match_def_path(cx, def_id, &paths::LINKED_LIST) {
-                        span_help_and_lint(
+                        span_lint_and_help(
                             cx,
                             LINKEDLIST,
                             hir_ty.span,
@@ -1785,7 +1785,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AbsurdExtremeComparisons {
                         conclusion
                     );
 
-                    span_help_and_lint(cx, ABSURD_EXTREME_COMPARISONS, expr.span, msg, &help);
+                    span_lint_and_help(cx, ABSURD_EXTREME_COMPARISONS, expr.span, msg, &help);
                 }
             }
         }
diff --git a/clippy_lints/src/unused_self.rs b/clippy_lints/src/unused_self.rs
index 247da580f45..9f1a7aaf977 100644
--- a/clippy_lints/src/unused_self.rs
+++ b/clippy_lints/src/unused_self.rs
@@ -6,7 +6,7 @@ use rustc_hir::{AssocItemKind, HirId, ImplItem, ImplItemKind, ImplItemRef, ItemK
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
 
-use crate::utils::span_help_and_lint;
+use crate::utils::span_lint_and_help;
 
 declare_clippy_lint! {
     /// **What it does:** Checks methods that contain a `self` argument but don't use it
@@ -71,7 +71,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedSelf {
                         };
                         visitor.visit_body(body);
                         if !visitor.uses_self {
-                            span_help_and_lint(
+                            span_lint_and_help(
                                 cx,
                                 UNUSED_SELF,
                                 self_param.span,
diff --git a/clippy_lints/src/utils/diagnostics.rs b/clippy_lints/src/utils/diagnostics.rs
index 4b832a8a104..04f2481851f 100644
--- a/clippy_lints/src/utils/diagnostics.rs
+++ b/clippy_lints/src/utils/diagnostics.rs
@@ -69,7 +69,7 @@ pub fn span_lint<T: LintContext>(cx: &T, lint: &'static Lint, sp: impl Into<Mult
 ///    |
 ///    = help: Consider using `std::f64::NAN` if you would like a constant representing NaN
 /// ```
-pub fn span_help_and_lint<'a, T: LintContext>(cx: &'a T, lint: &'static Lint, span: Span, msg: &str, help: &str) {
+pub fn span_lint_and_help<'a, T: LintContext>(cx: &'a T, lint: &'static Lint, span: Span, msg: &str, help: &str) {
     let mut db = DiagnosticWrapper(cx.struct_span_lint(lint, span, msg));
     db.0.help(help);
     db.docs_link(lint);
diff --git a/clippy_lints/src/utils/internal_lints.rs b/clippy_lints/src/utils/internal_lints.rs
index 1723f7863b3..ee18f1fb543 100644
--- a/clippy_lints/src/utils/internal_lints.rs
+++ b/clippy_lints/src/utils/internal_lints.rs
@@ -1,5 +1,5 @@
 use crate::utils::{
-    is_expn_of, match_def_path, match_type, method_calls, paths, span_help_and_lint, span_lint, span_lint_and_sugg,
+    is_expn_of, match_def_path, match_type, method_calls, paths, span_lint, span_lint_and_help, span_lint_and_sugg,
     walk_ptrs_ty,
 };
 use if_chain::if_chain;
@@ -319,7 +319,7 @@ impl CompilerLintFunctions {
         map.insert("struct_span_lint", "utils::span_lint");
         map.insert("lint", "utils::span_lint");
         map.insert("span_lint_note", "utils::span_note_and_lint");
-        map.insert("span_lint_help", "utils::span_help_and_lint");
+        map.insert("span_lint_help", "utils::span_lint_and_help");
         Self { map }
     }
 }
@@ -336,7 +336,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CompilerLintFunctions {
             if match_type(cx, ty, &paths::EARLY_CONTEXT)
                 || match_type(cx, ty, &paths::LATE_CONTEXT);
             then {
-                span_help_and_lint(
+                span_lint_and_help(
                     cx,
                     COMPILER_LINT_FUNCTIONS,
                     path.ident.span,
diff --git a/clippy_lints/src/zero_div_zero.rs b/clippy_lints/src/zero_div_zero.rs
index 32275cbcc80..f36da58843f 100644
--- a/clippy_lints/src/zero_div_zero.rs
+++ b/clippy_lints/src/zero_div_zero.rs
@@ -1,5 +1,5 @@
 use crate::consts::{constant_simple, Constant};
-use crate::utils::span_help_and_lint;
+use crate::utils::span_lint_and_help;
 use if_chain::if_chain;
 use rustc_hir::*;
 use rustc_lint::{LateContext, LateLintPass};
@@ -45,7 +45,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ZeroDiv {
                     | (_, Constant::F64(_)) => "f64",
                     _ => "f32"
                 };
-                span_help_and_lint(
+                span_lint_and_help(
                     cx,
                     ZERO_DIVIDED_BY_ZERO,
                     expr.span,
diff --git a/doc/adding_lints.md b/doc/adding_lints.md
index deecbf80a22..fcd7dd75760 100644
--- a/doc/adding_lints.md
+++ b/doc/adding_lints.md
@@ -249,14 +249,14 @@ Depending on how complex we want our lint message to be, we can choose from a
 variety of lint emission functions. They can all be found in
 [`clippy_lints/src/utils/diagnostics.rs`][diagnostics].
 
-`span_help_and_lint` seems most appropriate in this case. It allows us to
+`span_lint_and_help` seems most appropriate in this case. It allows us to
 provide an extra help message and we can't really suggest a better name
 automatically. This is how it looks:
 
 ```rust
 impl EarlyLintPass for FooFunctions {
     fn check_fn(&mut self, cx: &EarlyContext<'_>, _: FnKind<'_>, _: &FnDecl, span: Span, _: NodeId) {
-        span_help_and_lint(
+        span_lint_and_help(
             cx,
             FOO_FUNCTIONS,
             span,
@@ -284,7 +284,7 @@ With that we can expand our `check_fn` method to:
 impl EarlyLintPass for FooFunctions {
     fn check_fn(&mut self, cx: &EarlyContext<'_>, fn_kind: FnKind<'_>, _: &FnDecl, span: Span, _: NodeId) {
         if is_foo_fn(fn_kind) {
-            span_help_and_lint(
+            span_lint_and_help(
                 cx,
                 FOO_FUNCTIONS,
                 span,