diff --git a/src/trap.rs b/src/trap.rs index 316a26781da..f5e9d8c47e2 100644 --- a/src/trap.rs +++ b/src/trap.rs @@ -65,7 +65,7 @@ pub fn trap_unreachable( msg: impl AsRef, ) { codegen_print(fx, msg.as_ref()); - fx.bcx.ins().trap(TrapCode::User(!0)); + fx.bcx.ins().trap(TrapCode::UnreachableCodeReached); } /// Use this when something is unimplemented, but `libcore` or `libstd` requires it to codegen.