about summary refs log tree commit diff
path: root/library/std/src/sys/pal/windows/pipe.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/pal/windows/pipe.rs')
-rw-r--r--library/std/src/sys/pal/windows/pipe.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/pal/windows/pipe.rs b/library/std/src/sys/pal/windows/pipe.rs
index fd10df82d8b..013f588676a 100644
--- a/library/std/src/sys/pal/windows/pipe.rs
+++ b/library/std/src/sys/pal/windows/pipe.rs
@@ -375,7 +375,7 @@ impl AnonPipe {
         let mut overlapped: c::OVERLAPPED = crate::mem::zeroed();
         // `hEvent` is unused by `ReadFileEx` and `WriteFileEx`.
         // Therefore the documentation suggests using it to smuggle a pointer to the callback.
-        overlapped.hEvent = &mut async_result as *mut _ as *mut _;
+        overlapped.hEvent = core::ptr::addr_of_mut!(async_result) as *mut _;
 
         // Asynchronous read of the pipe.
         // If successful, `callback` will be called once it completes.