Rollup merge of #97987 - TaKO8Ki:remove-unnecessary-format-macro, r=Dylan-DPC
remove an unnecessary `String`
This commit is contained in:
commit
b3c9a2fde4
@ -304,11 +304,8 @@ fn bad_inference_failure_err(
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user