devela/code/result/panic/
reexports.rs

1// devela::code::result::panic::reexports
2//
3//! Reexported items.
4//
5
6use crate::reexport;
7
8/* structs */
9
10reexport! { rust: core::panic,
11    doc: "Passed to `#[panic_handler]` in `no_std`, where panics always carry a formatted message.",
12    PanicInfo
13}
14reexport! { rust: std::panic,
15    doc: "Passed to `std::panic::set_hook` in `std`, where panics can have arbitrary payloads.",
16    PanicHookInfo
17}
18reexport! { rust: core::panic,
19    doc: "A struct containing information about the location of a panic.",
20    @Location as PanicLocation
21}
22reexport! { rust: core::panic,
23    doc: "A simple wrapper around a type to assert that it is unwind safe.",
24    @AssertUnwindSafe as PanicAssertUnwindSafe
25}
26
27/* traits */
28
29reexport! { rust: core::panic,
30    doc: "A marker trait which represents a shared reference considered unwind safe.",
31    @RefUnwindSafe as PanicRefUnwindSafe
32    // RefUnwindSafe
33}
34reexport! { rust: core::panic,
35    doc: "A marker trait which represents “panic safe” types in Rust.",
36    @UnwindSafe as PanicUnwindSafe
37    // UnwindSafe
38}
39
40/* macros */
41
42reexport! { rust: core, doc: "Indicates unfinished code.", todo }
43reexport! { rust: core, doc: "Indicates unreachable code.", unreachable }
44reexport! { rust: core, doc: "Indicates unimplemented code.", unimplemented }
45
46// NOTE: the macro and the module have the same name
47//
48/// <span class='stab portability' title='re-exported from rust&#39;s `core`'>`core`</span>
49/// Panics the current thread.
50///
51#[doc = "*Re-exported from [`core::panic`][macro@crate::_core::panic]*."]
52#[doc = "\n\n---"]
53///
54/// The reason of the `_` suffix is to avoid conflicting with the Rust's prelude
55/// when glob importing from this crate. Since this macro has the same name
56/// as its sibling module `core::panic`, in order to be able to re-export
57/// only the macro we have to wrap it with our own.
58#[macro_export]
59#[cfg_attr(cargo_primary_package, doc(hidden))]
60macro_rules! panic_ { ($($tt:tt)*) => { core::panic![$($tt)*] } }
61#[doc(inline)]
62pub use panic_;