Rollup merge of #108924 - tmiasko:panic-immediate-abort, r=thomcc
panic_immediate_abort requires abort as a panic strategy Guide `panic_immediate_abort` users away from `-Cpanic=unwind` and towards `-Cpanic=abort` to avoid an accidental use of the feature with the unwind strategy, e.g., on a targets where unwind is the default. The `-Cpanic=unwind` combination doesn't offer the same benefits, since the code would still be generated under the assumption that functions implemented in Rust can unwind.
This commit is contained in:
commit
d9c05b853d
@ -29,6 +29,9 @@
|
||||
use crate::fmt;
|
||||
use crate::panic::{Location, PanicInfo};
|
||||
|
||||
#[cfg(feature = "panic_immediate_abort")]
|
||||
const _: () = assert!(cfg!(panic = "abort"), "panic_immediate_abort requires -C panic=abort");
|
||||
|
||||
// First we define the two main entry points that all panics go through.
|
||||
// In the end both are just convenience wrappers around `panic_impl`.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user