Auto merge of #88262 - klensy:pprust-cow, r=nagisa
Cow'ify some pprust methods Reduce number of potential needless de/allocations by using `Cow<'static, str>` instead of explicit `String` type.
This commit is contained in:
commit
ae0b03bc6b
5 changed files with 53 additions and 51 deletions
|
@ -806,7 +806,7 @@ impl<'a> Parser<'a> {
|
|||
.span_suggestion_short(
|
||||
sp,
|
||||
&format!("missing `{}`", token_str),
|
||||
token_str,
|
||||
token_str.into(),
|
||||
Applicability::MaybeIncorrect,
|
||||
)
|
||||
.emit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue