]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/needless_arbitrary_self_type.rs
Auto merge of #85421 - Smittyvb:rm_pushpop_unsafe, r=matthewjasper
[rust.git] / clippy_lints / src / needless_arbitrary_self_type.rs
index 7687962bdd9bf1bfffe8cd772fd164421ed7a204..fe3c4455be5e210821463f7628fdcb5dcc950279 100644 (file)
@@ -1,4 +1,5 @@
-use crate::utils::{in_macro, span_lint_and_sugg};
+use clippy_utils::diagnostics::span_lint_and_sugg;
+use clippy_utils::in_macro;
 use if_chain::if_chain;
 use rustc_ast::ast::{BindingMode, Lifetime, Mutability, Param, PatKind, Path, TyKind};
 use rustc_errors::Applicability;
@@ -120,7 +121,7 @@ fn check_param(&mut self, cx: &EarlyContext<'_>, p: &Param) {
         match &p.ty.kind {
             TyKind::Path(None, path) => {
                 if let PatKind::Ident(BindingMode::ByValue(mutbl), _, _) = p.pat.kind {
-                    check_param_inner(cx, path, p.span.to(p.ty.span), &Mode::Value, mutbl)
+                    check_param_inner(cx, path, p.span.to(p.ty.span), &Mode::Value, mutbl);
                 }
             },
             TyKind::Rptr(lifetime, mut_ty) => {
@@ -128,7 +129,7 @@ fn check_param(&mut self, cx: &EarlyContext<'_>, p: &Param) {
                 if let TyKind::Path(None, path) = &mut_ty.ty.kind;
                 if let PatKind::Ident(BindingMode::ByValue(Mutability::Not), _, _) = p.pat.kind;
                     then {
-                        check_param_inner(cx, path, p.span.to(p.ty.span), &Mode::Ref(*lifetime), mut_ty.mutbl)
+                        check_param_inner(cx, path, p.span.to(p.ty.span), &Mode::Ref(*lifetime), mut_ty.mutbl);
                     }
                 }
             },