about summary refs log tree commit diff
path: root/library/std/src/sys/pal/windows/pipe.rs
diff options
context:
space:
mode:
authorPavel Grigorenko <grigorenkopv@ya.ru>2024-02-24 16:02:17 +0300
committerPavel Grigorenko <grigorenkopv@ya.ru>2024-02-24 16:02:17 +0300
commitff187a92d84f352670a9a63e8519eac114456d38 (patch)
treebb16e4e323011af089b5e934ca5a765216567047 /library/std/src/sys/pal/windows/pipe.rs
parent8f359beca4e58bc3ae795a666301a8f47023044c (diff)
downloadrust-ff187a92d84f352670a9a63e8519eac114456d38.tar.gz
rust-ff187a92d84f352670a9a63e8519eac114456d38.zip
library: use `addr_of!`
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.