about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-07-21 18:42:07 +0200
committerGitHub <noreply@github.com>2022-07-21 18:42:07 +0200
commit230b7757195e287a69a1aeff7f54d770aa5baf44 (patch)
tree0e7372bd65377765b494ee5e37a72ef6f5ed78ab /compiler/rustc_trait_selection/src/traits
parentda18bd18cadf5b2f062f8aff5d9020a4f5237245 (diff)
parent611bbcb044518b028d08f5d8b4e961c733733942 (diff)
downloadrust-230b7757195e287a69a1aeff7f54d770aa5baf44.tar.gz
rust-230b7757195e287a69a1aeff7f54d770aa5baf44.zip
Rollup merge of #99528 - matthiaskrgr:2022_07_perf, r=estebank
couple of clippy::perf fixes
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
-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 bca80e7ab8a..5636c74452c 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
@@ -607,10 +607,10 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
                                 "{}, {}={}>",
                                 &constraint[..constraint.len() - 1],
                                 item.name,
-                                term.to_string()
+                                term
                             );
                         } else {
-                            constraint.push_str(&format!("<{}={}>", item.name, term.to_string()));
+                            constraint.push_str(&format!("<{}={}>", item.name, term));
                         }
                     }