Make 'static bound on panic_any explicit.

This was already implied because Any: 'static, but this makes it
explicit.
This commit is contained in:
Mara Bos 2021-01-19 21:41:41 +01:00
parent 230d5b1e5f
commit 8cac04e8b8

View File

@ -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<M: Any + Send>(msg: M) -> ! {
pub fn panic_any<M: 'static + Any + Send>(msg: M) -> ! {
crate::panicking::begin_panic(msg);
}