X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_lint%2Fsrc%2Fpass_by_value.rs;h=392e13f2fa94165d802ac24c0913934dd5d43d1b;hb=1d3f5b49d6bdfb2a051ddbfb7ad4b4ad603e9908;hp=57482a9edba880761fd97b38a0b4dc567aba419d;hpb=4a04f252f91b2ccef6fc16817b3e7a3aeda703b6;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 }, ); } }