about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/inline_asm.rs
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2024-11-09 06:57:05 +0000
committerGitHub <noreply@github.com>2024-11-09 06:57:05 +0000
commitc272bb4ec0a09744bef47fbe15ac6cded53d0216 (patch)
tree0c85c9634f6ff5ec409a9589eb9636d8a1d435b9 /compiler/rustc_codegen_cranelift/src/inline_asm.rs
parentd7aceeea71d4d32c7db671d39a448aa051bc90f6 (diff)
parent15d883e5b73ce6758926d8e3ef4a307f9ac6092f (diff)
downloadrust-c272bb4ec0a09744bef47fbe15ac6cded53d0216.tar.gz
rust-c272bb4ec0a09744bef47fbe15ac6cded53d0216.zip
Merge pull request #4019 from rust-lang/rustup-2024-11-09
Automatic Rustup
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/inline_asm.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/inline_asm.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/inline_asm.rs b/compiler/rustc_codegen_cranelift/src/inline_asm.rs
index 41f1b30d10b..0fbd5a16830 100644
--- a/compiler/rustc_codegen_cranelift/src/inline_asm.rs
+++ b/compiler/rustc_codegen_cranelift/src/inline_asm.rs
@@ -47,7 +47,7 @@ pub(crate) fn codegen_inline_asm_terminator<'tcx>(
     // 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".into()) {
-        fx.bcx.ins().trap(TrapCode::User(1));
+        fx.bcx.ins().trap(TrapCode::user(2).unwrap());
         return;
     }
 
@@ -137,7 +137,7 @@ pub(crate) fn codegen_inline_asm_terminator<'tcx>(
             fx.bcx.ins().jump(destination_block, &[]);
         }
         None => {
-            fx.bcx.ins().trap(TrapCode::UnreachableCodeReached);
+            fx.bcx.ins().trap(TrapCode::user(0 /* unreachable */).unwrap());
         }
     }
 }