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:
@@ -1528,7 +1528,7 @@ impl<'a> Parser<'a> {
|
||||
.span_suggestion(
|
||||
token.span,
|
||||
"must have an integer part",
|
||||
pprust::token_to_string(token),
|
||||
pprust::token_to_string(token).into(),
|
||||
Applicability::MachineApplicable,
|
||||
)
|
||||
.emit();
|
||||
|
||||
Reference in New Issue
Block a user