Releases: Techcable/nounwind.rs
Add #[track_caller] to panic_nounwind_fmt
Optimize nounwind_panic! with constant message
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.
Add assert_nounwind! macro
The assert_nounwind! and unreachable_nounwind macros are new convenience wrappers around panic_nounwind!. I don't intend to add the other panic macros, as they are much less useful.
Add #[track_caller] to the nounwind::panic_nounwind() function. This has a minor increase in code size in the caller, but this can be avoided in the way described in the docs.
Add panic_nounwind! macro
The panic_nounwind! error message provides superior error messages to nounwind::abort_unwind(|| panic!()). The latter prints two panic messages and a confusing backtrace.
These improved error messages require the std feature to be enabled. In the next version of nounwind (v0.2.0), the std feature will be enabled by default.
Change the libabort feature to be an optional dependency enabled by the old-rust-nostd feature (on by default). If the std feature is enabled, old versions of Rust can still be supported without needing old-rust-nostd.
No changes to nounwind-macros since v0.1.1. This version was mistakenly released as nounwind v0.1.1. I later yanked it when I realized I already released nounwind-macros v0.1.1.
Use syn-mid crate for macros instead of syn/full
The nounwind-macros crate does not need to parse the body of the function, so we can use the taiki-e/syn-mid crate instead of syn/full. This should reduce compile times (at least as long as no other crate requires syn/full).
Initial release
Passes basic tests. It should be useful!