about summary refs log tree commit diff
path: root/library/std/src/os/unix/net/addr.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-26 08:12:02 +0000
committerbors <bors@rust-lang.org>2024-09-26 08:12:02 +0000
commitf2becdff0496003217e7fc6fbfcaf2640e162775 (patch)
tree8fd53c6239adce92e37e8fcafe2dd75d06d535ca /library/std/src/os/unix/net/addr.rs
parent76ed7a1fa40c3f54d3fd3f834e12bf9c932d0146 (diff)
parentf4d9d1a0eaf7e5de8c368ac5af500adf9e06f6e7 (diff)
downloadrust-f2becdff0496003217e7fc6fbfcaf2640e162775.tar.gz
rust-f2becdff0496003217e7fc6fbfcaf2640e162775.zip
Auto merge of #130865 - cuviper:library-raw_ref_op, r=tgross35
Use `&raw` in the standard library

Since the stabilization in #127679 has reached stage0, 1.82-beta, we can
start using `&raw` freely, and even the soft-deprecated `ptr::addr_of!`
and `ptr::addr_of_mut!` can stop allowing the unstable feature.

I intentionally did not change any documentation or tests, but the rest
of those macro uses are all now using `&raw const` or `&raw mut` in the
standard library.
Diffstat (limited to 'library/std/src/os/unix/net/addr.rs')
-rw-r--r--library/std/src/os/unix/net/addr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/os/unix/net/addr.rs b/library/std/src/os/unix/net/addr.rs
index 79f2c365025..d7b87d480b7 100644
--- a/library/std/src/os/unix/net/addr.rs
+++ b/library/std/src/os/unix/net/addr.rs
@@ -98,7 +98,7 @@ impl SocketAddr {
         unsafe {
             let mut addr: libc::sockaddr_un = mem::zeroed();
             let mut len = mem::size_of::<libc::sockaddr_un>() as libc::socklen_t;
-            cvt(f(core::ptr::addr_of_mut!(addr) as *mut _, &mut len))?;
+            cvt(f((&raw mut addr) as *mut _, &mut len))?;
             SocketAddr::from_parts(addr, len)
         }
     }