about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2023-06-27 22:12:29 +0900
committerTakayuki Maeda <takoyaki0316@gmail.com>2023-06-27 22:12:29 +0900
commit8352c02fc29720d7bed8b0e59d7bc2ffae3c4f00 (patch)
treed0c5ef402b8ec89168267ccddf816bfd16aa8cd3
parent1b7efb5ade628b9fa8de1dd5d73f88a31dbd6ec4 (diff)
downloadrust-8352c02fc29720d7bed8b0e59d7bc2ffae3c4f00.tar.gz
rust-8352c02fc29720d7bed8b0e59d7bc2ffae3c4f00.zip
avoid using `format!("{}", ..)`
-rw-r--r--compiler/rustc_infer/src/infer/error_reporting/note_and_explain.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_infer/src/infer/error_reporting/note_and_explain.rs b/compiler/rustc_infer/src/infer/error_reporting/note_and_explain.rs
index 2a32f0b5047..7293de4c6c5 100644
--- a/compiler/rustc_infer/src/infer/error_reporting/note_and_explain.rs
+++ b/compiler/rustc_infer/src/infer/error_reporting/note_and_explain.rs
@@ -139,7 +139,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
                                     tcx,
                                     generics,
                                     diag,
-                                    &format!("{}", proj.self_ty()),
+                                    &proj.self_ty().to_string(),
                                     &path,
                                     None,
                                     matching_span,
@@ -153,7 +153,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
                                     tcx,
                                     generics,
                                     diag,
-                                    &format!("{}", proj.self_ty()),
+                                    &proj.self_ty().to_string(),
                                     &path,
                                     None,
                                     matching_span,