Skip to content

Commit f9a924d

Browse files
committed
remove an unnecessary format macro
1 parent 7092d42 commit f9a924d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,8 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
304304
error_code: TypeAnnotationNeeded,
305305
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
306306
let error_code = error_code.into();
307-
let mut err = self.tcx.sess.struct_span_err_with_code(
308-
span,
309-
&format!("type annotations needed"),
310-
error_code,
311-
);
307+
let mut err =
308+
self.tcx.sess.struct_span_err_with_code(span, "type annotations needed", error_code);
312309
err.span_label(span, arg_data.cannot_infer_msg());
313310
err
314311
}

0 commit comments

Comments
 (0)