Skip to content

Commit

Permalink
remove an unnecessary format macro
Browse files Browse the repository at this point in the history
  • Loading branch information
TaKO8Ki committed Jun 11, 2022
1 parent 7092d42 commit f9a924d
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 f9a924d

Please sign in to comment.