Rollup merge of #96023 - matthiaskrgr:clippyper1304, r=lcnr

couple of clippy::perf fixes
This commit is contained in:
Dylan DPC 2022-04-16 14:25:56 +02:00 committed by GitHub
commit 91847c43cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 7 deletions

View file

@ -2724,9 +2724,9 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
&format!(
"consider annotating `{}` with `#[derive({})]`",
trait_pred.skip_binder().self_ty(),
diagnostic_name.to_string(),
diagnostic_name,
),
format!("#[derive({})]\n", diagnostic_name.to_string()),
format!("#[derive({})]\n", diagnostic_name),
Applicability::MaybeIncorrect,
);
}