]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_lint/src/pass_by_value.rs
Rollup merge of #107029 - albertlarsan68:patch-2, r=Mark-Simulacrum
[rust.git] / compiler / rustc_lint / src / pass_by_value.rs
index 3df0fc385952d60a09e99b5b5cab955ad6e38f93..392e13f2fa94165d802ac24c0913934dd5d43d1b 100644 (file)
@@ -1,5 +1,3 @@
-#![deny(rustc::untranslatable_diagnostic)]
-#![deny(rustc::diagnostic_outside_of_impl)]
 use crate::lints::PassByValueDiag;
 use crate::{LateContext, LateLintPass, LintContext};
 use rustc_hir as hir;
@@ -34,7 +32,7 @@ fn check_ty(&mut self, cx: &LateContext<'_>, ty: &'tcx hir::Ty<'tcx>) {
                     cx.emit_spanned_lint(
                         PASS_BY_VALUE,
                         ty.span,
-                        PassByValueDiag { ty: t.clone(), suggestion: ty.span },
+                        PassByValueDiag { ty: t, suggestion: ty.span },
                     );
                 }
             }