]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/transmute/transmute_ptr_to_ref.rs
Merge commit '57b3c4b90f4346b3990c1be387c3b3ca7b78412c' into clippyup
[rust.git] / clippy_lints / src / transmute / transmute_ptr_to_ref.rs
index f14eef936453114abb3b4814fafe2cfe09c95826..5699f8e92cfca82428614d957a7075a249f6e071 100644 (file)
@@ -14,7 +14,7 @@ pub(super) fn check<'tcx>(
     e: &'tcx Expr<'_>,
     from_ty: Ty<'tcx>,
     to_ty: Ty<'tcx>,
-    args: &'tcx [Expr<'_>],
+    arg: &'tcx Expr<'_>,
     qpath: &'tcx QPath<'_>,
 ) -> bool {
     match (&from_ty.kind(), &to_ty.kind()) {
@@ -28,7 +28,7 @@ pub(super) fn check<'tcx>(
                     from_ty, to_ty
                 ),
                 |diag| {
-                    let arg = sugg::Sugg::hir(cx, &args[0], "..");
+                    let arg = sugg::Sugg::hir(cx, arg, "..");
                     let (deref, cast) = if *mutbl == Mutability::Mut {
                         ("&mut *", "*mut")
                     } else {