Module panic

1.41.0 · Source
Expand description

Panic support in the standard library.

Re-exports§

pub use self::location::Location;
pub use self::panic_info::PanicInfo;
pub use self::panic_info::PanicMessage;
pub use self::unwind_safe::AssertUnwindSafe;
pub use self::unwind_safe::RefUnwindSafe;
pub use self::unwind_safe::UnwindSafe;

Modules§

location 🔒
panic_info 🔒
unwind_safe 🔒

Macros§

const_assert 👻 Experimental
A version of assert that prints a non-formatting message in const contexts.
const_panic 👻 Experimental
Helper macro for panicking in a const fn. Invoke as:
panic_2015 👻 Experimental
panic_2021 👻 Experimental
unreachable_2015 👻 Experimental
unreachable_2021 👻 Experimental

Traits§

PanicPayload 👻 Experimental
An internal trait used by std to pass data from std to panic_unwind and other panic runtimes. Not intended to be stabilized any time soon, do not use.

Functions§

abort_unwindExperimental
Invokes a closure, aborting if the closure unwinds.