summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-04-13 22:18:28 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2022-04-13 22:18:28 +0200
commitbbd7ce690452f28d459643d97fbae89109cf5808 (patch)
treef5724f95a121a164d45952c104300ea96d2f3cd3 /compiler/rustc_trait_selection/src
parent0d13f6afeba4935499abe0c9a07426c94492c94e (diff)
downloadrust-bbd7ce690452f28d459643d97fbae89109cf5808.tar.gz
rust-bbd7ce690452f28d459643d97fbae89109cf5808.zip
couple of clippy::perf fixes
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
index ead1f0126c4..7485c082f4e 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
@@ -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,
             );
         }