about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/util.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-09-24 23:47:05 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-09-24 23:47:13 +0200
commitaa75d340353dd07bf347978360a9566831128e35 (patch)
treeecafac7320ba3974cb8440fdb98aa32b18dbfd7c /compiler/rustc_interface/src/util.rs
parent7e4b8d702fedccc9c7803773a22c2e053ac3b004 (diff)
downloadrust-aa75d340353dd07bf347978360a9566831128e35.tar.gz
rust-aa75d340353dd07bf347978360a9566831128e35.zip
Small string formatting cleanup
Diffstat (limited to 'compiler/rustc_interface/src/util.rs')
-rw-r--r--compiler/rustc_interface/src/util.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs
index 26e09c95e76..76ccd12797e 100644
--- a/compiler/rustc_interface/src/util.rs
+++ b/compiler/rustc_interface/src/util.rs
@@ -386,8 +386,8 @@ fn get_codegen_sysroot(
                 .collect::<Vec<_>>()
                 .join("\n* ");
             let err = format!(
-                "failed to find a `codegen-backends` folder \
-                           in the sysroot candidates:\n* {candidates}"
+                "failed to find a `codegen-backends` folder in the sysroot candidates:\n\
+                 * {candidates}"
             );
             early_dcx.early_fatal(err);
         });
@@ -396,10 +396,8 @@ fn get_codegen_sysroot(
 
     let d = sysroot.read_dir().unwrap_or_else(|e| {
         let err = format!(
-            "failed to load default codegen backend, couldn't \
-                           read `{}`: {}",
+            "failed to load default codegen backend, couldn't read `{}`: {e}",
             sysroot.display(),
-            e
         );
         early_dcx.early_fatal(err);
     });