1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#![no_std]

//! Abnormal termination: see [`abort`].

struct A;

impl Drop for A {
    #[inline(always)]
    fn drop(&mut self) { panic!() }
}

/// Abnormally terminate the process.
#[inline(always)]
pub fn abort() -> ! {
    let _a = A;
    panic!()
}