about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back/write.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-07-30 20:36:34 +0200
committerGitHub <noreply@github.com>2023-07-30 20:36:34 +0200
commitb192576036aab38f6245bf6bec1cb6019db65cd3 (patch)
treeb83071258f057ad8137bbd7fd48203bf2f78634e /compiler/rustc_codegen_llvm/src/back/write.rs
parente3ca397593795e0ffa95c5db2d4577dfdd1fb575 (diff)
parent3ce90b16490490aea6da61f913fb0ecbc5d4ec7a (diff)
downloadrust-b192576036aab38f6245bf6bec1cb6019db65cd3.tar.gz
rust-b192576036aab38f6245bf6bec1cb6019db65cd3.zip
Rollup merge of #114074 - matthiaskrgr:fmt_args_rustc_2, r=WaffleLapkin
inline format!() args from rustc_middle up to and including rustc_codegen_llvm (3)

r? `@WaffleLapkin`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/write.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/write.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs
index 0f5e975445f..cbcbdea84da 100644
--- a/compiler/rustc_codegen_llvm/src/back/write.rs
+++ b/compiler/rustc_codegen_llvm/src/back/write.rs
@@ -259,7 +259,7 @@ pub(crate) fn save_temp_bitcode(
         return;
     }
     unsafe {
-        let ext = format!("{}.bc", name);
+        let ext = format!("{name}.bc");
         let cgu = Some(&module.name[..]);
         let path = cgcx.output_filenames.temp_path_ext(&ext, cgu);
         let cstr = path_to_c_string(&path);
@@ -713,7 +713,7 @@ pub(crate) unsafe fn codegen(
 
                 let Ok(demangled) = rustc_demangle::try_demangle(input) else { return 0 };
 
-                if write!(cursor, "{:#}", demangled).is_err() {
+                if write!(cursor, "{demangled:#}").is_err() {
                     // Possible only if provided buffer is not big enough
                     return 0;
                 }
@@ -834,7 +834,7 @@ pub(crate) unsafe fn codegen(
 }
 
 fn create_section_with_flags_asm(section_name: &str, section_flags: &str, data: &[u8]) -> Vec<u8> {
-    let mut asm = format!(".section {},\"{}\"\n", section_name, section_flags).into_bytes();
+    let mut asm = format!(".section {section_name},\"{section_flags}\"\n").into_bytes();
     asm.extend_from_slice(b".ascii \"");
     asm.reserve(data.len());
     for &byte in data {