Skip to content

Commit 13ea648

Browse files
Stabilize PanicInfo::message() and PanicMessage
1 parent b6a3858 commit 13ea648

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

core/src/panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::any::Any;
1212
pub use self::location::Location;
1313
#[stable(feature = "panic_hooks", since = "1.10.0")]
1414
pub use self::panic_info::PanicInfo;
15-
#[unstable(feature = "panic_info_message", issue = "66745")]
15+
#[stable(feature = "panic_info_message", since = "CURRENT_RUSTC_VERSION")]
1616
pub use self::panic_info::PanicMessage;
1717
#[stable(feature = "catch_unwind", since = "1.9.0")]
1818
pub use self::unwind_safe::{AssertUnwindSafe, RefUnwindSafe, UnwindSafe};

core/src/panic/panic_info.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub struct PanicInfo<'a> {
2424
/// that were given to the `panic!()` macro.
2525
///
2626
/// See [`PanicInfo::message`].
27-
#[unstable(feature = "panic_info_message", issue = "66745")]
27+
#[stable(feature = "panic_info_message", since = "CURRENT_RUSTC_VERSION")]
2828
pub struct PanicMessage<'a> {
2929
message: fmt::Arguments<'a>,
3030
}
@@ -57,7 +57,7 @@ impl<'a> PanicInfo<'a> {
5757
/// }
5858
/// ```
5959
#[must_use]
60-
#[unstable(feature = "panic_info_message", issue = "66745")]
60+
#[stable(feature = "panic_info_message", since = "CURRENT_RUSTC_VERSION")]
6161
pub fn message(&self) -> PanicMessage<'_> {
6262
PanicMessage { message: self.message }
6363
}
@@ -164,7 +164,7 @@ impl<'a> PanicMessage<'a> {
164164
/// For most cases with placeholders, this function will return `None`.
165165
///
166166
/// See [`fmt::Arguments::as_str`] for details.
167-
#[unstable(feature = "panic_info_message", issue = "66745")]
167+
#[stable(feature = "panic_info_message", since = "CURRENT_RUSTC_VERSION")]
168168
#[rustc_const_unstable(feature = "const_arguments_as_str", issue = "103900")]
169169
#[must_use]
170170
#[inline]
@@ -173,15 +173,15 @@ impl<'a> PanicMessage<'a> {
173173
}
174174
}
175175

176-
#[unstable(feature = "panic_info_message", issue = "66745")]
176+
#[stable(feature = "panic_info_message", since = "CURRENT_RUSTC_VERSION")]
177177
impl Display for PanicMessage<'_> {
178178
#[inline]
179179
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
180180
formatter.write_fmt(self.message)
181181
}
182182
}
183183

184-
#[unstable(feature = "panic_info_message", issue = "66745")]
184+
#[stable(feature = "panic_info_message", since = "CURRENT_RUSTC_VERSION")]
185185
impl fmt::Debug for PanicMessage<'_> {
186186
#[inline]
187187
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {

std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@
341341
#![feature(maybe_uninit_uninit_array)]
342342
#![feature(maybe_uninit_write_slice)]
343343
#![feature(panic_can_unwind)]
344-
#![feature(panic_info_message)]
345344
#![feature(panic_internals)]
346345
#![feature(pointer_is_aligned_to)]
347346
#![feature(portable_simd)]

0 commit comments

Comments
 (0)