diff options
| author | bors <bors@rust-lang.org> | 2021-08-29 17:46:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-08-29 17:46:29 +0000 |
| commit | ae0b03bc6b4e1544f43b9a8053bdb0f0ed4a19e1 (patch) | |
| tree | 42249083f8e03da1de24a7b775c1d2e6e182954d /compiler/rustc_parse/src/parser/mod.rs | |
| parent | daa4dc997c777676b0f0e48d0311cc5e7bde5f87 (diff) | |
| parent | c565339c37def41500c6d3175c2db3be8c5c4f76 (diff) | |
| download | rust-ae0b03bc6b4e1544f43b9a8053bdb0f0ed4a19e1.tar.gz rust-ae0b03bc6b4e1544f43b9a8053bdb0f0ed4a19e1.zip | |
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.
Diffstat (limited to 'compiler/rustc_parse/src/parser/mod.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 4c3c140d171..c34fd02e806 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -806,7 +806,7 @@ impl<'a> Parser<'a> { .span_suggestion_short( sp, &format!("missing `{}`", token_str), - token_str, + token_str.into(), Applicability::MaybeIncorrect, ) .emit(); |
