From 230d5b1e5f0a7e2e75be11c2324f23445df83850 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Tue, 19 Jan 2021 21:30:49 +0100 Subject: [PATCH 1/2] Stabilize std::panic::panic_any. --- library/std/src/panic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs index d18b94b6c1aef..bb08fa35d17a3 100644 --- a/library/std/src/panic.rs +++ b/library/std/src/panic.rs @@ -31,7 +31,7 @@ pub use core::panic::{Location, PanicInfo}; /// accessed later using [`PanicInfo::payload`]. /// /// See the [`panic!`] macro for more information about panicking. -#[unstable(feature = "panic_any", issue = "78500")] +#[stable(feature = "panic_any", since = "1.51.0")] #[inline] pub fn panic_any(msg: M) -> ! { crate::panicking::begin_panic(msg); From 8cac04e8b862ba144c51dd4e1e9cb47caec4632b Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Tue, 19 Jan 2021 21:41:41 +0100 Subject: [PATCH 2/2] Make 'static bound on panic_any explicit. This was already implied because Any: 'static, but this makes it explicit. --- library/std/src/panic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs index bb08fa35d17a3..0f568da459bef 100644 --- a/library/std/src/panic.rs +++ b/library/std/src/panic.rs @@ -33,7 +33,7 @@ pub use core::panic::{Location, PanicInfo}; /// See the [`panic!`] macro for more information about panicking. #[stable(feature = "panic_any", since = "1.51.0")] #[inline] -pub fn panic_any(msg: M) -> ! { +pub fn panic_any(msg: M) -> ! { crate::panicking::begin_panic(msg); }