Rollup merge of #126322 - m-ou-se:panicinfo-and-panicinfo-2, r=RalfJung · model-checking/verify-rust-std@027c82e (original) (raw)
`@@ -29,9 +29,8 @@ impl<'a> PanicInfo<'a> {
`
29
29
`PanicInfo { location, message, can_unwind, force_no_backtrace }
`
30
30
`}
`
31
31
``
32
``
`` -
/// If the panic!
macro from the core
crate (not from std
)
``
33
``
`-
/// was used with a formatting string and some additional arguments,
`
34
``
`` -
/// returns that message ready to be used for example with [fmt::write
]
``
``
32
`` +
/// The message that was given to the panic!
macro,
``
``
33
`` +
/// ready to be formatted with e.g. [fmt::write
].
``
35
34
`#[must_use]
`
36
35
`#[unstable(feature = "panic_info_message", issue = "66745")]
`
37
36
`pub fn message(&self) -> fmt::Arguments<'_> {
`
`@@ -72,15 +71,15 @@ impl<'a> PanicInfo<'a> {
`
72
71
``
73
72
`/// Returns the payload associated with the panic.
`
74
73
`///
`
75
``
`` -
/// On core::panic::PanicInfo
, this method never returns anything useful.
``
``
74
`` +
/// On this type, core::panic::PanicInfo
, this method never returns anything useful.
``
76
75
`` /// It only exists because of compatibility with [std::panic::PanicHookInfo
],
``
77
76
`/// which used to be the same type.
`
78
77
`///
`
79
78
`` /// See [std::panic::PanicHookInfo::payload
].
``
80
79
`///
`
81
80
`` /// [std::panic::PanicHookInfo
]: ../../std/panic/struct.PanicHookInfo.html
``
82
81
`` /// [std::panic::PanicHookInfo::payload
]: ../../std/panic/struct.PanicHookInfo.html#method.payload
``
83
``
`-
#[deprecated(since = "1.77.0", note = "this never returns anything useful")]
`
``
82
`+
#[deprecated(since = "1.81.0", note = "this never returns anything useful")]
`
84
83
`#[stable(feature = "panic_hooks", since = "1.10.0")]
`
85
84
`#[allow(deprecated, deprecated_in_future)]
`
86
85
`pub fn payload(&self) -> &(dyn crate::any::Any + Send) {
`