We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8095423 + bd44d85 commit 0d88b94Copy full SHA for 0d88b94
library/std/src/panic.rs
@@ -60,6 +60,7 @@ impl<'a> PanicHookInfo<'a> {
60
/// Returns the payload associated with the panic.
61
///
62
/// This will commonly, but not always, be a `&'static str` or [`String`].
63
+ /// If you only care about such payloads, use [`payload_as_str`] instead.
64
65
/// A invocation of the `panic!()` macro in Rust 2021 or later will always result in a
66
/// panic payload of type `&'static str` or `String`.
@@ -69,6 +70,7 @@ impl<'a> PanicHookInfo<'a> {
69
70
/// can result in a panic payload other than a `&'static str` or `String`.
71
72
/// [`String`]: ../../std/string/struct.String.html
73
+ /// [`payload_as_str`]: PanicHookInfo::payload_as_str
74
75
/// # Examples
76
0 commit comments