Skip to content

Commit 594f9c6

Browse files
committed
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 rust-lang#146974 for additional context.
1 parent 4fd3181 commit 594f9c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/panicking.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ use crate::panic::{Location, PanicInfo};
3636
compile_error!(
3737
"panic_immediate_abort is now a real panic strategy! \
3838
Enable it with `panic = \"immediate-abort\"` in Cargo.toml, \
39-
or with the compiler flags `-Zunstable-options -Cpanic=immediate-abort`"
39+
or with the compiler flags `-Zunstable-options -Cpanic=immediate-abort`. \
40+
In both cases, you still need to build core, e.g. with `-Zbuild-std`"
4041
);
4142

4243
// First we define the two main entry points that all panics go through.

0 commit comments

Comments
 (0)