From 8352c02fc29720d7bed8b0e59d7bc2ffae3c4f00 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Tue, 27 Jun 2023 22:12:29 +0900 Subject: [PATCH] avoid using `format!("{}", ..)` --- .../rustc_infer/src/infer/error_reporting/note_and_explain.rs | 4 ++-- 1 file 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 2a32f0b504737..7293de4c6c5e5 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,