trap

Function trap 

Source
pub fn trap() -> !
Expand description

Abnormally terminate the program by generating a trap instruction.

This is semantically equivalent to the LLVM llvm.trap intrinsic.

One advantage over calling the abort function is that the caller code-size is often smaller.

Examples found in repository?
examples/trapcli.rs (line 12)
8fn main() {
9    if std::env::var_os("SILENT").is_none() {
10        eprintln!("Calling libabort::trap()");
11    }
12    libabort::trap();
13}