Module panic
Optional Panic System Opt-in; does nothing unless panic_set_handler is called. In freestanding mode defaults to infinite loop; hosted mode calls abort().
Type aliases
| PanicHandler |
Functions
| panic_set_handler | Install a custom panic handler. Pass NULL to reset to default. |
| panic_at | Trigger a panic with message, file, line. Never returns. |
| expect_ref | Checked narrowing of a nullable reference: returns 'r' as '&T', or panics with 'msg' if it is null. The explicit form of "this can't be null here" — a cast '(&T)r' is rejected because it would skip the check. For recoverable absence, 'match (r) { case null: ... case some(x): ... }'. |
Macros
| PANIC | |
| PANIC_ASSERT |