extra 0.1.0

Extra stuff the standard library lacks of.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// An unreachable function.
///
/// In debug mode this is equivalent to calling `unreachable!()`. In release mode, however, this
/// will assume the call to be _statically unreachable_. Revoking this in reachable code is
/// undefined behavior, and might result in various unsafe conditions. Hence, the `unsafe`.
pub unsafe fn unreachable() -> ! {
    use std::intrinsics::unreachable;

    #[cfg(debug)]
    unreachable!();

    #[cfg(not(debug))]
    unreachable();
}