diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-04-10 20:39:02 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-04-12 07:51:23 +0900 |
| commit | 29c41280a123163827d76b82f251965975c468e8 (patch) | |
| tree | a22f6e87f7eb13bc78b18e3cacd512ab91645a6e /compiler/rustc_parse/src/parser | |
| parent | 90ca44752a79dd414d9a0ccf7a74533a99080988 (diff) | |
| download | rust-29c41280a123163827d76b82f251965975c468e8.tar.gz rust-29c41280a123163827d76b82f251965975c468e8.zip | |
use `to_string` instead of `format!`
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index 5bf6f22b5d0..ca81921faed 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -970,7 +970,7 @@ impl<'a> Parser<'a> { } if fixed_crate_name { let fixed_name_sp = ident.span.to(idents.last().unwrap().span); - let mut fixed_name = format!("{}", ident.name); + let mut fixed_name = ident.name.to_string(); for part in idents { fixed_name.push_str(&format!("_{}", part.name)); } |
