unreachable!() in debug, std::intrinsics::unreachable() in release.
Use the crates.io repository; add this to your Cargo.toml
along
with the rest of your dependencies:
[dependencies]
debug_unreachable = "0.1"
Jonathan Reem is the primary author and maintainer of debug-unreachable.
MIT