Skip to content

Commit

Permalink
Rollup merge of #97987 - TaKO8Ki:remove-unnecessary-format-macro, r=D…
Browse files Browse the repository at this point in the history
…ylan-DPC

remove an unnecessary `String`
  • Loading branch information
Dylan-DPC authored Jun 11, 2022
2 parents 54d7b3f + f9a924d commit b3c9a2f
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b3c9a2f

Please sign in to comment.