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:
bors 2021-08-29 17:46:29 +00:00
commit ae0b03bc6b
5 changed files with 53 additions and 51 deletions

View file

@ -806,7 +806,7 @@ impl<'a> Parser<'a> {
.span_suggestion_short(
sp,
&format!("missing `{}`", token_str),
token_str,
token_str.into(),
Applicability::MaybeIncorrect,
)
.emit();