avoid &str
to String
conversions
This commit is contained in:
parent
58136ffa92
commit
934c8c2299
3 changed files with 3 additions and 3 deletions
|
@ -386,7 +386,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
|
||||||
).span_suggestion_verbose(
|
).span_suggestion_verbose(
|
||||||
lhs.span.shrink_to_lo(),
|
lhs.span.shrink_to_lo(),
|
||||||
"you might have meant to introduce a new binding",
|
"you might have meant to introduce a new binding",
|
||||||
"let ".to_string(),
|
"let ",
|
||||||
Applicability::MachineApplicable,
|
Applicability::MachineApplicable,
|
||||||
).emit();
|
).emit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -467,7 +467,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
|
||||||
err.span_suggestion_verbose(
|
err.span_suggestion_verbose(
|
||||||
span.shrink_to_lo(),
|
span.shrink_to_lo(),
|
||||||
"consider borrowing here",
|
"consider borrowing here",
|
||||||
"&".to_string(),
|
'&',
|
||||||
Applicability::MaybeIncorrect,
|
Applicability::MaybeIncorrect,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -385,7 +385,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
|
||||||
err.span_suggestion_verbose(
|
err.span_suggestion_verbose(
|
||||||
local_decl.source_info.span.shrink_to_lo(),
|
local_decl.source_info.span.shrink_to_lo(),
|
||||||
"consider changing this to be mutable",
|
"consider changing this to be mutable",
|
||||||
"mut ".to_string(),
|
"mut ",
|
||||||
Applicability::MachineApplicable,
|
Applicability::MachineApplicable,
|
||||||
);
|
);
|
||||||
let tcx = self.infcx.tcx;
|
let tcx = self.infcx.tcx;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue