diff options
| author | StackOverflowExcept1on <109800286+StackOverflowExcept1on@users.noreply.github.com> | 2024-06-20 13:05:45 +0300 |
|---|---|---|
| committer | StackOverflowExcept1on <109800286+StackOverflowExcept1on@users.noreply.github.com> | 2024-06-20 14:06:33 +0300 |
| commit | bb00657d168e347ac04b5f90e8e77edc14a03050 (patch) | |
| tree | 085aec10857094ca63545e5bf62d4e676d7ac4e5 | |
| parent | 1208eddaff59c98e37574c860de6f68aa404958f (diff) | |
| download | rust-bb00657d168e347ac04b5f90e8e77edc14a03050.tar.gz rust-bb00657d168e347ac04b5f90e8e77edc14a03050.zip | |
Stabilize `PanicInfo::message()` and `PanicMessage`
| -rw-r--r-- | library/core/src/panic.rs | 2 | ||||
| -rw-r--r-- | library/core/src/panic/panic_info.rs | 10 | ||||
| -rw-r--r-- | library/std/src/lib.rs | 1 | ||||
| -rw-r--r-- | tests/run-make/wasm-exceptions-nostd/src/lib.rs | 1 |
4 files changed, 6 insertions, 8 deletions
diff --git a/library/core/src/panic.rs b/library/core/src/panic.rs index 56ede02673c..37c338dd9b7 100644 --- a/library/core/src/panic.rs +++ b/library/core/src/panic.rs @@ -12,7 +12,7 @@ use crate::any::Any; pub use self::location::Location; #[stable(feature = "panic_hooks", since = "1.10.0")] pub use self::panic_info::PanicInfo; -#[unstable(feature = "panic_info_message", issue = "66745")] +#[stable(feature = "panic_info_message", since = "CURRENT_RUSTC_VERSION")] pub use self::panic_info::PanicMessage; #[stable(feature = "catch_unwind", since = "1.9.0")] pub use self::unwind_safe::{AssertUnwindSafe, RefUnwindSafe, UnwindSafe}; diff --git a/library/core/src/panic/panic_info.rs b/library/core/src/panic/panic_info.rs index 91953fd656b..6bbb9c30171 100644 --- a/library/core/src/panic/panic_info.rs +++ b/library/core/src/panic/panic_info.rs @@ -24,7 +24,7 @@ pub struct PanicInfo<'a> { /// that were given to the `panic!()` macro. /// /// See [`PanicInfo::message`]. -#[unstable(feature = "panic_info_message", issue = "66745")] +#[stable(feature = "panic_info_message", since = "CURRENT_RUSTC_VERSION")] pub struct PanicMessage<'a> { message: fmt::Arguments<'a>, } @@ -57,7 +57,7 @@ impl<'a> PanicInfo<'a> { /// } /// ``` #[must_use] - #[unstable(feature = "panic_info_message", issue = "66745")] + #[stable(feature = "panic_info_message", since = "CURRENT_RUSTC_VERSION")] pub fn message(&self) -> PanicMessage<'_> { PanicMessage { message: self.message } } @@ -164,7 +164,7 @@ impl<'a> PanicMessage<'a> { /// For most cases with placeholders, this function will return `None`. /// /// See [`fmt::Arguments::as_str`] for details. - #[unstable(feature = "panic_info_message", issue = "66745")] + #[stable(feature = "panic_info_message", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_unstable(feature = "const_arguments_as_str", issue = "103900")] #[must_use] #[inline] @@ -173,7 +173,7 @@ impl<'a> PanicMessage<'a> { } } -#[unstable(feature = "panic_info_message", issue = "66745")] +#[stable(feature = "panic_info_message", since = "CURRENT_RUSTC_VERSION")] impl Display for PanicMessage<'_> { #[inline] fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { @@ -181,7 +181,7 @@ impl Display for PanicMessage<'_> { } } -#[unstable(feature = "panic_info_message", issue = "66745")] +#[stable(feature = "panic_info_message", since = "CURRENT_RUSTC_VERSION")] impl fmt::Debug for PanicMessage<'_> { #[inline] fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 1c226f9f08f..0f4064d10b5 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -341,7 +341,6 @@ #![feature(maybe_uninit_uninit_array)] #![feature(maybe_uninit_write_slice)] #![feature(panic_can_unwind)] -#![feature(panic_info_message)] #![feature(panic_internals)] #![feature(pointer_is_aligned_to)] #![feature(portable_simd)] diff --git a/tests/run-make/wasm-exceptions-nostd/src/lib.rs b/tests/run-make/wasm-exceptions-nostd/src/lib.rs index 3ea8797d3a6..ef2f117e01a 100644 --- a/tests/run-make/wasm-exceptions-nostd/src/lib.rs +++ b/tests/run-make/wasm-exceptions-nostd/src/lib.rs @@ -5,7 +5,6 @@ #![feature(core_intrinsics)] #![feature(lang_items)] #![feature(link_llvm_intrinsics)] -#![feature(panic_info_message)] extern crate alloc; |
