Re:Never patterns, exhaustive matching, and uninhabited type...
by saagarjha on Saturday August 18, 2018 @10:50PM
(#17792280)
This isn't an assert, it's not a runtime check; it's done at compile time. You need to prove to the compiler that your code can never reach this point; common ways of doing so are by calling exit or inserting an unconditional infinite loop. If your underlying computational platform is broken, this isn't going to save you, but I don't think there's much you can do at that point.
[ Parent
| on HN ]