[][src]Function std::panic::panic_any

pub fn panic_any<M: Any + Send>(msg: M) -> !
🔬 This is a nightly-only experimental API. (panic_any #78500)

Panic the current thread with the given message as the panic payload.

The message can be of any (Any + Send) type, not just strings.

The message is wrapped in a Box<'static + Any + Send>, which can be accessed later using PanicInfo::payload.

See the panic! macro for more information about panicking.