diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md index 38ca71cd0bd..2767e247ea1 100644 --- a/src/doc/src/reference/unstable.md +++ b/src/doc/src/reference/unstable.md @@ -1680,11 +1680,13 @@ cargo-features = ["open-namespaces"] * Tracking Issue: [#16042](https://github.com/rust-lang/cargo/issues/16042) * Upstream Tracking Issue: [rust-lang/rust#147286](https://github.com/rust-lang/rust/issues/147286) -Allow use of [`-Cpanic=immediate-abort`](../../rustc/codegen-options/index.html#panic) through a Cargo profile - +Extends the `panic` profile setting to support the +[`immediate-abort`](../../rustc/codegen-options/index.html#panic) panic strategy. This can be enabled like so: + ```toml -cargo-features = ["immediate-abort"] +# Cargo.toml +cargo-features = ["panic-immediate-abort"] [package] # ... @@ -1693,6 +1695,20 @@ cargo-features = ["immediate-abort"] panic = "immediate-abort" ``` +To set this in a profile in Cargo configuration, +you need to use either `-Z panic-immediate-abort` CLI flag +or the `[unstable]` table to enable it. +For example, + +```toml +# .cargo/config.toml +[unstable] +panic-immediate-abort = true + +[profile.release] +panic = "immediate-abort" +``` + ## `[lints.cargo]` * Tracking Issue: [#12235](https://github.com/rust-lang/cargo/issues/12235)