remove an unnecessary format macro
This commit is contained in:
parent
7092d42c04
commit
f9a924d3c9
1 changed files with 2 additions and 5 deletions
|
@ -304,11 +304,8 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||||
error_code: TypeAnnotationNeeded,
|
error_code: TypeAnnotationNeeded,
|
||||||
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
|
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
|
||||||
let error_code = error_code.into();
|
let error_code = error_code.into();
|
||||||
let mut err = self.tcx.sess.struct_span_err_with_code(
|
let mut err =
|
||||||
span,
|
self.tcx.sess.struct_span_err_with_code(span, "type annotations needed", error_code);
|
||||||
&format!("type annotations needed"),
|
|
||||||
error_code,
|
|
||||||
);
|
|
||||||
err.span_label(span, arg_data.cannot_infer_msg());
|
err.span_label(span, arg_data.cannot_infer_msg());
|
||||||
err
|
err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue