diff --git a/library/std/src/panicking.rs b/library/std/src/panicking.rs index 9b045980d4543..25c9201f2ed3a 100644 --- a/library/std/src/panicking.rs +++ b/library/std/src/panicking.rs @@ -325,7 +325,7 @@ pub mod panic_count { pub const ALWAYS_ABORT_FLAG: usize = 1 << (usize::BITS - 1); // Panic count for the current thread. - thread_local! { static LOCAL_PANIC_COUNT: Cell = Cell::new(0) } + thread_local! { static LOCAL_PANIC_COUNT: Cell = const { Cell::new(0) } } // Sum of panic counts from all threads. The purpose of this is to have // a fast path in `is_zero` (which is used by `panicking`). In any particular