]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/panicking.rs
Auto merge of #92461 - rust-lang:const_tls_local_panic_count, r=Mark-Simulacrum
[rust.git] / library / std / src / panicking.rs
index 9b045980d4543dfc33ebd3265aaace13afd55002..25c9201f2ed3a37c9018af1497e1491ba218d02f 100644 (file)
@@ -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<usize> = Cell::new(0) }
+    thread_local! { static LOCAL_PANIC_COUNT: Cell<usize> = 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