diff options
| author | GnomedDev <david2005thomas@gmail.com> | 2024-06-24 16:17:59 +0100 |
|---|---|---|
| committer | GnomedDev <david2005thomas@gmail.com> | 2024-07-24 21:11:55 +0100 |
| commit | db8cdc5d37da5c0cf306fba51d07d6af10d69bd7 (patch) | |
| tree | 1604dbb5b9365474e31b3a2ba556487d2fd50a56 /compiler/rustc_codegen_cranelift/src/inline_asm.rs | |
| parent | 2ccafed862f6906707a390caf180449dd64cad2e (diff) | |
| download | rust-db8cdc5d37da5c0cf306fba51d07d6af10d69bd7.tar.gz rust-db8cdc5d37da5c0cf306fba51d07d6af10d69bd7.zip | |
Use Cow<'static, str> for InlineAsmTemplatePiece::String
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/inline_asm.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/inline_asm.rs | 4 |
1 files changed, 1 insertions, 3 deletions
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; } |
