dope 0.12.0

The manifold runtime
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::mem::ManuallyDrop;
use std::panic::{AssertUnwindSafe, catch_unwind};
use std::process::abort;

#[cold]
pub fn abort_on_drop_panic<T>(payload: T) {
    let outcome = ManuallyDrop::new(catch_unwind(AssertUnwindSafe(|| drop(payload))));
    if outcome.is_err() {
        abort();
    }
}