Closed
Description
I tried this code:
//! ```should_panic
//! panic!();
//! ```
> cargo test --doc -Zbuild-std -Zpanic-abort-tests --config=profile.dev.panic='"abort"' --target=x86_64-unknown-linux-gnu
I expected to see this happen: successful test run using panic_abort
Instead, this happened:
---- src/lib.rs - (line 1) stdout ----
error: the crate `panic_unwind` does not have the panic strategy `unwind`
error: aborting due to 1 previous error
Couldn't compile the test.
There seems to be a couple of issues here, the panic=abort
doesn't seem to be applied to rustdoc, so it still uses the panic_unwind
runtime, and for some reason that runtime has been broken when -Cpanic=abort
is active.
Meta
rustc --version --verbose
:
rustc 1.77.0-nightly (098d4fd74 2024-01-16)
binary: rustc
commit-hash: 098d4fd74c078b12bfc2e9438a2a04bc18b393bc
commit-date: 2024-01-16
host: x86_64-unknown-linux-gnu
release: 1.77.0-nightly
LLVM version: 17.0.6