1
Fork 0

Use Cow<'static, str> for InlineAsmTemplatePiece::String

This commit is contained in:
GnomedDev 2024-06-24 16:17:59 +01:00
parent 2ccafed862
commit db8cdc5d37
No known key found for this signature in database
GPG key ID: 9BF10F8372B254D1
4 changed files with 28 additions and 27 deletions

View file

@ -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;
}