From db8cdc5d37da5c0cf306fba51d07d6af10d69bd7 Mon Sep 17 00:00:00 2001 From: GnomedDev Date: Mon, 24 Jun 2024 16:17:59 +0100 Subject: Use Cow<'static, str> for InlineAsmTemplatePiece::String --- compiler/rustc_codegen_cranelift/src/inline_asm.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'compiler/rustc_codegen_cranelift/src/inline_asm.rs') diff --git a/compiler/rustc_codegen_cranelift/src/inline_asm.rs b/compiler/rustc_codegen_cranelift/src/inline_asm.rs index c88230c9360..16edec47e10 100644 --- a/compiler/rustc_codegen_cranelift/src/inline_asm.rs +++ b/compiler/rustc_codegen_cranelift/src/inline_asm.rs @@ -46,9 +46,7 @@ pub(crate) fn codegen_inline_asm_terminator<'tcx>( // Used by panic_abort on Windows, but uses a syntax which only happens to work with // asm!() by accident and breaks with the GNU assembler as well as global_asm!() for // the LLVM backend. - if template.len() == 1 - && template[0] == InlineAsmTemplatePiece::String("int $$0x29".to_string()) - { + if template.len() == 1 && template[0] == InlineAsmTemplatePiece::String("int $$0x29".into()) { fx.bcx.ins().trap(TrapCode::User(1)); return; } -- cgit 1.4.1-3-g733a5