about summary refs log tree commit diff
path: root/library/std/src/sys/windows/stack_overflow.rs
diff options
context:
space:
mode:
authorChris Denton <chris@chrisdenton.dev>2023-04-06 17:27:47 +0100
committerChris Denton <chris@chrisdenton.dev>2023-05-05 20:48:16 +0100
commit3ffb27ff89db780e88abe829783565a7122be1c5 (patch)
treea27ada9306b06ebf880c01d40167640fde5b3540 /library/std/src/sys/windows/stack_overflow.rs
parente92ee0355969e7c34d13299d8567e384dc24e9ef (diff)
downloadrust-3ffb27ff89db780e88abe829783565a7122be1c5.tar.gz
rust-3ffb27ff89db780e88abe829783565a7122be1c5.zip
Use new bindings
Diffstat (limited to 'library/std/src/sys/windows/stack_overflow.rs')
-rw-r--r--library/std/src/sys/windows/stack_overflow.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/windows/stack_overflow.rs b/library/std/src/sys/windows/stack_overflow.rs
index 18a2a36ad25..0caf0a317a4 100644
--- a/library/std/src/sys/windows/stack_overflow.rs
+++ b/library/std/src/sys/windows/stack_overflow.rs
@@ -18,7 +18,7 @@ impl Handler {
     }
 }
 
-extern "system" fn vectored_handler(ExceptionInfo: *mut c::EXCEPTION_POINTERS) -> c::LONG {
+unsafe extern "system" fn vectored_handler(ExceptionInfo: *mut c::EXCEPTION_POINTERS) -> c::LONG {
     unsafe {
         let rec = &(*(*ExceptionInfo).ExceptionRecord);
         let code = rec.ExceptionCode;
@@ -34,7 +34,7 @@ extern "system" fn vectored_handler(ExceptionInfo: *mut c::EXCEPTION_POINTERS) -
 }
 
 pub unsafe fn init() {
-    if c::AddVectoredExceptionHandler(0, vectored_handler).is_null() {
+    if c::AddVectoredExceptionHandler(0, Some(vectored_handler)).is_null() {
         panic!("failed to install exception handler");
     }
     // Set the thread stack guarantee for the main thread.