Skip to content

Commit 5b9c009

Browse files
authored
tests: Add "C-unwind" to extern functions that can panic (#1354)
With Rust 1.81 `extern "C"` functions are by-default not allowed to unwind and instead follow the `panic=abort` strategy. As a consequence, the `#[should_panic]` macro no longer works on `extern "C"` functions that panic. To mitigate one can change the signature from `extern "C"` to `extern "C-unwind"` to change the strategy. This commit does this for any unit test that uses `extern "C"` functions in combination with `#[should_panic]`. See also rust-lang/rust#116088
1 parent 8a07316 commit 5b9c009

File tree

3 files changed

+96
-92
lines changed

3 files changed

+96
-92
lines changed

0 commit comments

Comments
 (0)