Skip to content

Commit

Permalink
Rollup merge of rust-lang#97987 - TaKO8Ki:remove-unnecessary-format-m…
Browse files Browse the repository at this point in the history
…acro, r=Dylan-DPC

remove an unnecessary `String`
  • Loading branch information
Dylan-DPC committed Jun 11, 2022
2 parents 958cf35 + f9a924d commit b9903d9
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 b9903d9

Please sign in to comment.