Rollup merge of #147470 - ia0:immediate-abort, r=Mark-Simulacrum

Clarify how to remediate the panic_immediate_abort error

Users who build `core` for the sole purpose of enabling `panic_immediate_abort` might expect "`panic_immediate_abort` is now a real panic strategy" to mean that setting `panic = "immediate-abort"` in `Cargo.toml` or `-Cpanic=immediate-abort` in `RUSTFLAGS` to be sufficient for migration. But this is not the case, `core` still needs to be built for those changes to take effect.

See https://github.com/rust-lang/rust/issues/146974 for additional context.

See https://github.com/rust-lang/rust/issues/147286 and https://github.com/rust-lang/cargo/issues/16042 for the revelant tracking issues.
This commit is contained in:
Stuart Cook 2025-10-09 18:43:24 +11:00 committed by GitHub
commit 8e363d32ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,7 +36,8 @@ use crate::panic::{Location, PanicInfo};
compile_error!(
"panic_immediate_abort is now a real panic strategy! \
Enable it with `panic = \"immediate-abort\"` in Cargo.toml, \
or with the compiler flags `-Zunstable-options -Cpanic=immediate-abort`"
or with the compiler flags `-Zunstable-options -Cpanic=immediate-abort`. \
In both cases, you still need to build core, e.g. with `-Zbuild-std`"
);
// First we define the two main entry points that all panics go through.