about summary refs log tree commit diff
path: root/compiler/rustc_span
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2022-07-10 03:18:56 +0900
committerTakayuki Maeda <takoyaki0316@gmail.com>2022-07-10 03:18:56 +0900
commitbda83e6543fa89fd64efafdfb93924fede792850 (patch)
treee8dde870dcd0d51cf61237856de4f7cd19b2d278 /compiler/rustc_span
parentfac8fa56726f7a5b2d4880a4719c5f99beec8328 (diff)
downloadrust-bda83e6543fa89fd64efafdfb93924fede792850.tar.gz
rust-bda83e6543fa89fd64efafdfb93924fede792850.zip
avoid some `&str` to `String` conversions
Diffstat (limited to 'compiler/rustc_span')
-rw-r--r--compiler/rustc_span/src/hygiene.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_span/src/hygiene.rs b/compiler/rustc_span/src/hygiene.rs
index 955db72157c..3df4dfb74b3 100644
--- a/compiler/rustc_span/src/hygiene.rs
+++ b/compiler/rustc_span/src/hygiene.rs
@@ -629,8 +629,7 @@ pub fn debug_hygiene_data(verbose: bool) -> String {
         if verbose {
             format!("{:#?}", data)
         } else {
-            let mut s = String::from("");
-            s.push_str("Expansions:");
+            let mut s = String::from("Expansions:");
             let mut debug_expn_data = |(id, expn_data): (&ExpnId, &ExpnData)| {
                 s.push_str(&format!(
                     "\n{:?}: parent: {:?}, call_site_ctxt: {:?}, def_site_ctxt: {:?}, kind: {:?}",