]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/if_not_else.rs
Auto merge of #4809 - iankronquist:patch-1, r=flip1995
[rust.git] / clippy_lints / src / if_not_else.rs
index 760a00801c6f29c0d96390bc0f380798e531eaa9..8deed214203852226edee4b14ebbf28ae10b5c0e 100644 (file)
@@ -6,7 +6,7 @@
 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 @@ fn check_expr(&mut self, cx: &EarlyContext<'_>, item: &Expr) {
             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 @@ fn check_expr(&mut self, cx: &EarlyContext<'_>, item: &Expr) {
                         );
                     },
                     ExprKind::Binary(ref kind, _, _) if kind.node == BinOpKind::Ne => {
-                        span_help_and_lint(
+                        span_lint_and_help(
                             cx,
                             IF_NOT_ELSE,
                             item.span,