]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/types.rs
Auto merge of #4809 - iankronquist:patch-1, r=flip1995
[rust.git] / clippy_lints / src / types.rs
index b271b58d903b7f020b6890f0c9a180217feac8f2..e47f2480a541d87881b1752a63e229a95cac6957 100644 (file)
@@ -27,7 +27,7 @@
 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 @@ fn check_ty(&mut self, cx: &LateContext<'_, '_>, hir_ty: &hir::Ty<'_>, is_local:
                 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,
@@ -316,12 +316,12 @@ fn check_ty(&mut self, cx: &LateContext<'_, '_>, hir_ty: &hir::Ty<'_>, is_local:
                                 OPTION_OPTION,
                                 hir_ty.span,
                                 "consider using `Option<T>` instead of `Option<Option<T>>` or a custom \
-                                enum if you need to distinguish all 3 cases",
+                                 enum if you need to distinguish all 3 cases",
                             );
                             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 @@ fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>) {
                         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);
                 }
             }
         }