Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions src/doc/src/reference/unstable.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
# ...
Expand All @@ -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)
Expand Down