about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/asm.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-18 16:17:46 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2022-12-18 16:17:46 +0100
commit3af7df91fcbe4c5197e55dc78838aeb5aa978d89 (patch)
tree7f5c77c2f156c2c26978c21e1cf66c194a88d9f7 /compiler/rustc_codegen_llvm/src/asm.rs
parent35a99eef32a2b7b9d8e77dde539f869e522d181f (diff)
downloadrust-3af7df91fcbe4c5197e55dc78838aeb5aa978d89.tar.gz
rust-3af7df91fcbe4c5197e55dc78838aeb5aa978d89.zip
use &str / String literals instead of format!()
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/asm.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/asm.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/asm.rs b/compiler/rustc_codegen_llvm/src/asm.rs
index 219a4f8fa89..606f710641f 100644
--- a/compiler/rustc_codegen_llvm/src/asm.rs
+++ b/compiler/rustc_codegen_llvm/src/asm.rs
@@ -144,7 +144,7 @@ impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
                     // We prefer the latter because it matches the behavior of
                     // Clang.
                     if late && matches!(reg, InlineAsmRegOrRegClass::Reg(_)) {
-                        constraints.push(format!("{}", reg_to_llvm(reg, Some(&in_value.layout))));
+                        constraints.push(reg_to_llvm(reg, Some(&in_value.layout)).to_string());
                     } else {
                         constraints.push(format!("{}", op_idx[&idx]));
                     }