Rollup merge of #96248 - TaKO8Ki:remove-unnecessary-format-args, r=compiler-errors

Stop using a string literal as a format argument
This commit is contained in:
Dylan DPC 2022-04-21 20:55:19 +02:00 committed by GitHub
commit 18b6ad327f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1484,7 +1484,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
err.span_suggestion_hidden(
return_span,
"use `.collect()` to allocate the iterator",
format!("{}{}", snippet, ".collect::<Vec<_>>()"),
format!("{snippet}.collect::<Vec<_>>()"),
Applicability::MaybeIncorrect,
);
}