]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/mut_reference.rs
Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup
[rust.git] / src / tools / clippy / clippy_lints / src / mut_reference.rs
index 05457e80d52c960833eb9c853da293d7532b26cd..6efe8ffcde03616bb11c2662ee0520e9ada8602a 100644 (file)
@@ -33,7 +33,7 @@
 impl<'tcx> LateLintPass<'tcx> for UnnecessaryMutPassed {
     fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) {
         match e.kind {
-            ExprKind::Call(ref fn_expr, ref arguments) => {
+            ExprKind::Call(fn_expr, arguments) => {
                 if let ExprKind::Path(ref path) = fn_expr.kind {
                     check_arguments(
                         cx,
@@ -44,11 +44,11 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) {
                     );
                 }
             },
-            ExprKind::MethodCall(ref path, _, ref arguments, _) => {
+            ExprKind::MethodCall(path, _, arguments, _) => {
                 let def_id = cx.typeck_results().type_dependent_def_id(e.hir_id).unwrap();
                 let substs = cx.typeck_results().node_substs(e.hir_id);
                 let method_type = cx.tcx.type_of(def_id).subst(cx.tcx, substs);
-                check_arguments(cx, arguments, method_type, &path.ident.as_str(), "method")
+                check_arguments(cx, arguments, method_type, &path.ident.as_str(), "method");
             },
             _ => (),
         }