X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_lint%2Fsrc%2Fpass_by_value.rs;h=392e13f2fa94165d802ac24c0913934dd5d43d1b;hb=00efb0cb960e4b89a80cad7d44fa0eefd223f513;hp=57482a9edba880761fd97b38a0b4dc567aba419d;hpb=c6e3a47843649a2d7658272f7aee5c2e529b5ce4;p=rust.git diff --git a/compiler/rustc_lint/src/pass_by_value.rs b/compiler/rustc_lint/src/pass_by_value.rs index 57482a9edba..392e13f2fa9 100644 --- a/compiler/rustc_lint/src/pass_by_value.rs +++ b/compiler/rustc_lint/src/pass_by_value.rs @@ -32,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 }, ); } }