about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2022-11-08 19:45:48 +0900
committerTakayuki Maeda <takoyaki0316@gmail.com>2022-11-11 10:51:02 +0900
commit004986b79b933a5c9ec160b977f791b154c8d275 (patch)
treeb9c3a26c7c2e0fe77055e6a7bd9c03f49c6c8c11
parentc467006fd0d0fd046590c7867fcfef2062d144a3 (diff)
downloadrust-004986b79b933a5c9ec160b977f791b154c8d275.tar.gz
rust-004986b79b933a5c9ec160b977f791b154c8d275.zip
avoid unnecessary `format!`
-rw-r--r--compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
index fb8669e949c..5a0af00b6e1 100644
--- a/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
+++ b/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
@@ -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,
                                 );