diff options
| author | bors <bors@rust-lang.org> | 2022-02-19 12:15:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-02-19 12:15:10 +0000 |
| commit | e08d5693609a659e45025b8ea4dbd9efa342fa68 (patch) | |
| tree | 582c4ebf10591a5a758a3552b3e4cd7996e73974 /src/doc | |
| parent | cb4ee81ef555126e49b3e9f16ca6f12a3264a451 (diff) | |
| parent | 5a083dbbe6cbb5e7bcab3b21942d162b4628e76f (diff) | |
| download | rust-e08d5693609a659e45025b8ea4dbd9efa342fa68.tar.gz rust-e08d5693609a659e45025b8ea4dbd9efa342fa68.zip | |
Auto merge of #94148 - matthiaskrgr:rollup-jgea68f, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #92902 (Improve the documentation of drain members) - #93658 (Stabilize `#[cfg(panic = "...")]`) - #93954 (rustdoc-json: buffer output) - #93979 (Add debug assertions to validate NUL terminator in c strings) - #93990 (pre #89862 cleanup) - #94006 (Use a `Field` in `ConstraintCategory::ClosureUpvar`) - #94086 (Fix ScalarInt to char conversion) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/unstable-book/src/language-features/cfg-panic.md | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/doc/unstable-book/src/language-features/cfg-panic.md b/src/doc/unstable-book/src/language-features/cfg-panic.md deleted file mode 100644 index f5b73128ad6..00000000000 --- a/src/doc/unstable-book/src/language-features/cfg-panic.md +++ /dev/null @@ -1,38 +0,0 @@ -# `cfg_panic` - -The tracking issue for this feature is: [#77443] - -[#77443]: https://github.com/rust-lang/rust/issues/77443 - ------------------------- - -The `cfg_panic` feature makes it possible to execute different code -depending on the panic strategy. - -Possible values at the moment are `"unwind"` or `"abort"`, although -it is possible that new panic strategies may be added to Rust in the -future. - -## Examples - -```rust -#![feature(cfg_panic)] - -#[cfg(panic = "unwind")] -fn a() { - // ... -} - -#[cfg(not(panic = "unwind"))] -fn a() { - // ... -} - -fn b() { - if cfg!(panic = "abort") { - // ... - } else { - // ... - } -} -``` |
