diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2020-10-31 09:49:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-31 09:49:28 +0100 |
| commit | 76b8b00b4ff09b958e9ebcaa851f5dcb7b827f8a (patch) | |
| tree | 8c0a906e51338ebc3c57322d0a1869eefbd80497 /compiler/rustc_codegen_llvm/src | |
| parent | 3478d7c3607ffbba629af2265c01002771e48c18 (diff) | |
| parent | b48fee010c92dde304154ba45c0e41d396e60568 (diff) | |
| download | rust-76b8b00b4ff09b958e9ebcaa851f5dcb7b827f8a.tar.gz rust-76b8b00b4ff09b958e9ebcaa851f5dcb7b827f8a.zip | |
Rollup merge of #74622 - fusion-engineering-forks:panic-box, r=KodrAus
Add std::panic::panic_any. The discussion of #67984 lead to the conclusion that there should be a macro or function separate from `std::panic!()` for throwing arbitrary payloads, to make it possible to deprecate or disallow (in edition 2021) `std::panic!(arbitrary_payload)`. Alternative names: - `panic_with!(..)` - ~~`start_unwind(..)`~~ (panicking doesn't always unwind) - `throw!(..)` - `panic_throwing!(..)` - `panic_with_value(..)` - `panic_value(..)` - `panic_with(..)` - `panic_box(..)` - `panic(..)` The equivalent (private, unstable) function in `libstd` is called `std::panicking::begin_panic`. I suggest `panic_any`, because it allows for any (`Any + Send`) type. _Tracking issue: #78500_
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
