Convert some functions to return Cow<'static,str> instead of String to reduce potential reallocations
This commit is contained in:
parent
2ad56d5c90
commit
c565339c37
5 changed files with 53 additions and 51 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue