diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-08-06 21:29:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-06 21:29:28 +0200 |
| commit | 5209bc6661618857acd49971db9ad832308b96c7 (patch) | |
| tree | 94e5c83584204dff6d1b287e117c26cbda77e65f /library/std/src/panic.rs | |
| parent | 940a003985e354e5977e38dd588d0977d43f8622 (diff) | |
| parent | 74e85a218b418db7ff29f0743efb12c130dfd3ca (diff) | |
| download | rust-5209bc6661618857acd49971db9ad832308b96c7.tar.gz rust-5209bc6661618857acd49971db9ad832308b96c7.zip | |
Rollup merge of #144861 - Kivooeo:payload-as-str-stabilization, r=ChrisDenton
Stabilize `panic_payload_as_str` feature Closes [tracking issue](https://github.com/rust-lang/rust/issues/125175). Part of https://github.com/rust-lang/rust/issues/116005. FCP ended more than year ago in tracking issue, I'm not sure if we should rerun it.
Diffstat (limited to 'library/std/src/panic.rs')
| -rw-r--r-- | library/std/src/panic.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs index 913ef72f674..cff4f20b5a8 100644 --- a/library/std/src/panic.rs +++ b/library/std/src/panic.rs @@ -108,8 +108,6 @@ impl<'a> PanicHookInfo<'a> { /// # Example /// /// ```should_panic - /// #![feature(panic_payload_as_str)] - /// /// std::panic::set_hook(Box::new(|panic_info| { /// if let Some(s) = panic_info.payload_as_str() { /// println!("panic occurred: {s:?}"); @@ -122,7 +120,7 @@ impl<'a> PanicHookInfo<'a> { /// ``` #[must_use] #[inline] - #[unstable(feature = "panic_payload_as_str", issue = "125175")] + #[stable(feature = "panic_payload_as_str", since = "CURRENT_RUSTC_VERSION")] pub fn payload_as_str(&self) -> Option<&str> { if let Some(s) = self.payload.downcast_ref::<&str>() { Some(s) |
