]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs
Rollup merge of #76082 - jyn514:top-level-links, r=ollie27,GuillaumeGomez
[rust.git] / src / tools / clippy / clippy_lints / src / needless_pass_by_value.rs
index 047a78b087841b7224c83536bfbb4eaa488f7908..7e933c674dd781a7093df9eb6c77e7457f6d56c3 100644 (file)
@@ -194,7 +194,7 @@ fn check_fn(
 
                     // Dereference suggestion
                     let sugg = |diag: &mut DiagnosticBuilder<'_>| {
-                        if let ty::Adt(def, ..) = ty.kind {
+                        if let ty::Adt(def, ..) = ty.kind() {
                             if let Some(span) = cx.tcx.hir().span_if_local(def.did) {
                                 if can_type_implement_copy(cx.tcx, cx.param_env, ty).is_ok() {
                                     diag.span_help(span, "consider marking this type as `Copy`");