about summary refs log tree commit diff
path: root/library/std/src/sys/pal/windows/stack_overflow.rs
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2024-07-15 02:28:43 -0700
committerGitHub <noreply@github.com>2024-07-15 02:28:43 -0700
commit64495b5f947cac59b46bd4c6c50e90f25c598fc3 (patch)
tree117dc3e496825d389f0b9f2d39c74564f8bab528 /library/std/src/sys/pal/windows/stack_overflow.rs
parent0da95bd8698d9edd684e0978e888ad1bd29f19ba (diff)
parent816d90ae5f87e9819f5693fa38e56ed7d76697ca (diff)
downloadrust-64495b5f947cac59b46bd4c6c50e90f25c598fc3.tar.gz
rust-64495b5f947cac59b46bd4c6c50e90f25c598fc3.zip
Rollup merge of #127712 - ChrisDenton:raw-types, r=workingjubilee
Windows: Remove some unnecessary type aliases

Back in the olden days, C did not have fixed-width types so these type aliases were at least potentially useful. Nowadays, and especially in Rust, we don't need the aliases and they don't help with anything. Notably the windows bindings we use also don't bother with the aliases. And even when we have used aliases they're often only used once then forgotten about.

The only one that gives me pause is `DWORD` because it's used a fair bit. But it's still used inconsistently and we implicitly assume it's a `u32` anyway (e.g. `as` casting from an `i32`).
Diffstat (limited to 'library/std/src/sys/pal/windows/stack_overflow.rs')
-rw-r--r--library/std/src/sys/pal/windows/stack_overflow.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/pal/windows/stack_overflow.rs b/library/std/src/sys/pal/windows/stack_overflow.rs
index f93f31026f8..59feb0c601a 100644
--- a/library/std/src/sys/pal/windows/stack_overflow.rs
+++ b/library/std/src/sys/pal/windows/stack_overflow.rs
@@ -11,7 +11,7 @@ pub unsafe fn reserve_stack() {
     debug_assert_ne!(result, 0, "failed to reserve stack space for exception handling");
 }
 
-unsafe extern "system" fn vectored_handler(ExceptionInfo: *mut c::EXCEPTION_POINTERS) -> c::LONG {
+unsafe extern "system" fn vectored_handler(ExceptionInfo: *mut c::EXCEPTION_POINTERS) -> i32 {
     unsafe {
         let rec = &(*(*ExceptionInfo).ExceptionRecord);
         let code = rec.ExceptionCode;