avoid unnecessary format!

This commit is contained in:
Takayuki Maeda 2022-11-08 19:45:48 +09:00
parent c467006fd0
commit 004986b79b

View file

@ -374,7 +374,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let annotation_span = ty.span;
err.span_suggestion(
annotation_span.with_hi(annotation_span.lo()),
format!("alternatively, consider changing the type annotation"),
"alternatively, consider changing the type annotation",
suggest_annotation,
Applicability::MaybeIncorrect,
);