]> git.proxmox.com Git - rustc.git/blobdiff - library/std/src/panicking.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / library / std / src / panicking.rs
index f1baf077580e672d03f4b924d7940d1dc0908740..25c9201f2ed3a37c9018af1497e1491ba218d02f 100644 (file)
@@ -47,7 +47,7 @@ extern "C" {
 }
 
 #[allow(improper_ctypes)]
-extern "C-unwind" {
+extern "Rust" {
     /// `payload` is passed through another layer of raw pointers as `&mut dyn Trait` is not
     /// FFI-safe. `BoxMeUp` lazily performs allocation only when needed (this avoids allocations
     /// when using the "abort" panic runtime).
@@ -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