3 ms·
To be clear, Rust has this exact same functionality, with an intrinsic as well as a regular function that wraps said intrinsic. The only difference is that it’
by steveklabnik 4y ago
To be clear, Rust has this exact same functionality, with an intrinsic as well as a regular function that wraps said intrinsic.
The only difference is that it’s marked unsafe.
https://doc.rust-lang.org/std/hint/fn.unreachable_unchecked.html https://doc.rust-lang.org/std/hint/fn.unreachable_unchecked....
There is a safe version that is just a wrapper around panic! with a standardized message.