about summary refs log tree commit diff
path: root/library/unwind
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/unwind
parent8f359beca4e58bc3ae795a666301a8f47023044c (diff)
downloadrust-ff187a92d84f352670a9a63e8519eac114456d38.tar.gz
rust-ff187a92d84f352670a9a63e8519eac114456d38.zip
library: use `addr_of!`
Diffstat (limited to 'library/unwind')
-rw-r--r--library/unwind/src/libunwind.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/unwind/src/libunwind.rs b/library/unwind/src/libunwind.rs
index 1b5f6f9dde3..527c408c89e 100644
--- a/library/unwind/src/libunwind.rs
+++ b/library/unwind/src/libunwind.rs
@@ -219,14 +219,14 @@ if #[cfg(any(target_os = "ios", target_os = "tvos", target_os = "watchos", targe
     pub unsafe fn _Unwind_GetGR(ctx: *mut _Unwind_Context, reg_index: c_int) -> _Unwind_Word {
         let mut val: _Unwind_Word = core::ptr::null();
         _Unwind_VRS_Get(ctx, _UVRSC_CORE, reg_index as _Unwind_Word, _UVRSD_UINT32,
-                        &mut val as *mut _ as *mut c_void);
+                        core::ptr::addr_of_mut!(val) as *mut c_void);
         val
     }
 
     pub unsafe fn _Unwind_SetGR(ctx: *mut _Unwind_Context, reg_index: c_int, value: _Unwind_Word) {
         let mut value = value;
         _Unwind_VRS_Set(ctx, _UVRSC_CORE, reg_index as _Unwind_Word, _UVRSD_UINT32,
-                        &mut value as *mut _ as *mut c_void);
+                        core::ptr::addr_of_mut!(value) as *mut c_void);
     }
 
     pub unsafe fn _Unwind_GetIP(ctx: *mut _Unwind_Context)