Skip to content

Commit 4946409

Browse files
authored
Unrolled build for #144861
Rollup merge of #144861 - Kivooeo:payload-as-str-stabilization, r=ChrisDenton Stabilize `panic_payload_as_str` feature Closes [tracking issue](#125175). Part of #116005. FCP ended more than year ago in tracking issue, I'm not sure if we should rerun it.
2 parents 7d82b83 + 74e85a2 commit 4946409

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

library/std/src/panic.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ impl<'a> PanicHookInfo<'a> {
108108
/// # Example
109109
///
110110
/// ```should_panic
111-
/// #![feature(panic_payload_as_str)]
112-
///
113111
/// std::panic::set_hook(Box::new(|panic_info| {
114112
/// if let Some(s) = panic_info.payload_as_str() {
115113
/// println!("panic occurred: {s:?}");
@@ -122,7 +120,7 @@ impl<'a> PanicHookInfo<'a> {
122120
/// ```
123121
#[must_use]
124122
#[inline]
125-
#[unstable(feature = "panic_payload_as_str", issue = "125175")]
123+
#[stable(feature = "panic_payload_as_str", since = "CURRENT_RUSTC_VERSION")]
126124
pub fn payload_as_str(&self) -> Option<&str> {
127125
if let Some(s) = self.payload.downcast_ref::<&str>() {
128126
Some(s)

0 commit comments

Comments
 (0)