From f9a924d3c97b5cb8f4b00bcb33dd1a925f68773e Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Sat, 11 Jun 2022 18:35:10 +0900 Subject: [PATCH] remove an unnecessary format macro --- .../src/infer/error_reporting/need_type_info.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs b/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs index 207d2870c5c79..4c734b1589b85 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs @@ -304,11 +304,8 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { error_code: TypeAnnotationNeeded, ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { let error_code = error_code.into(); - let mut err = self.tcx.sess.struct_span_err_with_code( - span, - &format!("type annotations needed"), - error_code, - ); + let mut err = + self.tcx.sess.struct_span_err_with_code(span, "type annotations needed", error_code); err.span_label(span, arg_data.cannot_infer_msg()); err }