panic_unwinds

Function panic_unwinds 

Source
pub fn panic_unwinds() -> bool
Expand description

Whether a panic in this binary unwinds (true) rather than aborting.

There is no false in a built binary: under panic = "abort" the panic below kills the process with SIGABRT and this never returns. That is what makes it a usable CI assertion: the two observable outcomes are UNWIND_VERDICT on stdout and a dead process. The false arm exists so the function is total. The deliberate panic’s message reaches stderr, named as the self-check so it cannot be read as a crash; that is the whole cost of not touching the process-global panic hook here.

Not unit-tested: cargo test builds with the test profile, which unwinds, so an in-process assertion could only ever say “true” and the abort direction takes the harness with it. The “Assert the built binary unwinds” step in .github/workflows/server-binaries.yml is the test.