Skip to content

Optimize nounwind_panic! with constant message

Choose a tag to compare

@Techcable Techcable released this 09 Jan 06:45
· 22 commits to master since this release
6067825

This release optimizes nounwind_panic! and friends to avoid formatting overhead when the message is constant. So nounwind_panic!("message") does not construct a core::fmt::Arguments. This reduces code-size in the caller.

Adds doctests and a basic integration test. It's difficult to test the panic/abort case due to aborting the test process.

Move panic internals to a separate module to make it less likely to invoke accidentally.