about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-04-12 08:46:57 +0200
committerGitHub <noreply@github.com>2022-04-12 08:46:57 +0200
commit3ff5cb20b6e8b5c4b4a8fe5dbd07d5d66ffbcd43 (patch)
tree84c6dedc6a3b9f6d68fbaf0a25e4046fc57f7256
parenta899ebd10241518dcd08245cd736de3666d6b2ea (diff)
parent29c41280a123163827d76b82f251965975c468e8 (diff)
downloadrust-3ff5cb20b6e8b5c4b4a8fe5dbd07d5d66ffbcd43.tar.gz
rust-3ff5cb20b6e8b5c4b4a8fe5dbd07d5d66ffbcd43.zip
Rollup merge of #95881 - TaKO8Ki:use-to-string-instead-of-format, r=compiler-errors
Use `to_string` instead of `format!`
-rw-r--r--compiler/rustc_parse/src/parser/item.rs2
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));
             }