]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_lint/src/pass_by_value.rs
Rollup merge of #107714 - Wilfred:round_docs, r=m-ou-se
[rust.git] / compiler / rustc_lint / src / pass_by_value.rs
index 212b8aa1574df22b1347c8432301d1a2153ba3b1..392e13f2fa94165d802ac24c0913934dd5d43d1b 100644 (file)
@@ -24,7 +24,7 @@ fn check_ty(&mut self, cx: &LateContext<'_>, ty: &'tcx hir::Ty<'tcx>) {
         match &ty.kind {
             TyKind::Ref(_, hir::MutTy { ty: inner_ty, mutbl: hir::Mutability::Not }) => {
                 if let Some(impl_did) = cx.tcx.impl_of_method(ty.hir_id.owner.to_def_id()) {
-                    if cx.tcx.bound_impl_trait_ref(impl_did).is_some() {
+                    if cx.tcx.impl_trait_ref(impl_did).is_some() {
                         return;
                     }
                 }
@@ -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 },
                     );
                 }
             }