use &str / String literals instead of format!()
This commit is contained in:
parent
35a99eef32
commit
3af7df91fc
19 changed files with 37 additions and 55 deletions
|
@ -649,7 +649,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
if !assign_value.is_empty() {
|
||||
err.span_suggestion_verbose(
|
||||
sugg_span.shrink_to_hi(),
|
||||
format!("consider assigning a value"),
|
||||
"consider assigning a value",
|
||||
format!(" = {}", assign_value),
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
|
|
|
@ -270,7 +270,7 @@ impl<'tcx> BorrowExplanation<'tcx> {
|
|||
for extra in extra_info {
|
||||
match extra {
|
||||
ExtraConstraintInfo::PlaceholderFromPredicate(span) => {
|
||||
err.span_note(*span, format!("due to current limitations in the borrow checker, this implies a `'static` lifetime"));
|
||||
err.span_note(*span, "due to current limitations in the borrow checker, this implies a `'static` lifetime");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -472,7 +472,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
|
|||
for extra in extra_info {
|
||||
match extra {
|
||||
ExtraConstraintInfo::PlaceholderFromPredicate(span) => {
|
||||
diag.span_note(span, format!("due to current limitations in the borrow checker, this implies a `'static` lifetime"));
|
||||
diag.span_note(span, "due to current limitations in the borrow checker, this implies a `'static` lifetime");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue