]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/map_clone.rs
Rollup merge of #94113 - Mizobrook-kan:issue-94025, r=estebank
[rust.git] / src / tools / clippy / clippy_lints / src / map_clone.rs
index 3f8eeb736fbd2e5c155054c7176c04dc0abe8bc4..e233300e26ab898e94efcdbd13b5bee37b6dbcf7 100644 (file)
@@ -100,7 +100,7 @@ fn check_expr(&mut self, cx: &LateContext<'_>, e: &hir::Expr<'_>) {
                                     let obj_ty = cx.typeck_results().expr_ty(obj);
                                     if let ty::Ref(_, ty, mutability) = obj_ty.kind() {
                                         if matches!(mutability, Mutability::Not) {
-                                            let copy = is_copy(cx, ty);
+                                            let copy = is_copy(cx, *ty);
                                             self.lint_explicit_closure(cx, e.span, args[0].span, copy);
                                         }
                                     } else {