diff options
Diffstat (limited to 'library/std/src/sys/windows/stack_overflow.rs')
-rw-r--r-- | library/std/src/sys/windows/stack_overflow.rs | 4 |
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. |