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;
}
}
cx.emit_spanned_lint(
PASS_BY_VALUE,
ty.span,
- PassByValueDiag { ty: t.clone(), suggestion: ty.span },
+ PassByValueDiag { ty: t, suggestion: ty.span },
);
}
}