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.
1 parent 7cd9505 commit 74e85a2Copy full SHA for 74e85a2
library/std/src/panic.rs
@@ -108,8 +108,6 @@ impl<'a> PanicHookInfo<'a> {
108
/// # Example
109
///
110
/// ```should_panic
111
- /// #![feature(panic_payload_as_str)]
112
- ///
113
/// std::panic::set_hook(Box::new(|panic_info| {
114
/// if let Some(s) = panic_info.payload_as_str() {
115
/// println!("panic occurred: {s:?}");
@@ -122,7 +120,7 @@ impl<'a> PanicHookInfo<'a> {
122
120
/// ```
123
121
#[must_use]
124
#[inline]
125
- #[unstable(feature = "panic_payload_as_str", issue = "125175")]
+ #[stable(feature = "panic_payload_as_str", since = "CURRENT_RUSTC_VERSION")]
126
pub fn payload_as_str(&self) -> Option<&str> {
127
if let Some(s) = self.payload.downcast_ref::<&str>() {
128
Some(s)
0 commit comments