Skip to main content

abort_immediate

Function abort_immediate 

Source
pub const fn abort_immediate() -> !
🔬This is a nightly-only experimental API. (core_intrinsics)
Expand description

Ungracefully aborts the execution of the process.

This is the intrinsic for directly implementing core::process::abort_immediate which, on most platforms, will invoke an invalid instruction. On Unix, the process will probably terminate with a signal like SIGABRT, SIGILL, SIGTRAP, SIGSEGV or SIGBUS. The precise behavior is not guaranteed and not stable.

std::process::abort is to be preferred if possible, as its behavior is more user-friendly and more stable.

Note that, unlike most intrinsics, this is safe to call; it does not require an unsafe block. Therefore, implementations must not require the user to uphold any safety invariants.

The stabilized version of this intrinsic is core::process::abort_immediate.