about summary refs log tree commit diff
path: root/library/core/src/alloc
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-02-11 19:04:29 +0100
committerRalf Jung <post@ralfj.de>2024-02-21 20:15:52 +0100
commitb58f647d5488dce73bba517907c44af2c2a618c4 (patch)
tree24e9b1e2a3299ccd459c5e00db09c64220d6ba21 /library/core/src/alloc
parent1d447a9946effc38c4b964a888ab408a3df3c246 (diff)
downloadrust-b58f647d5488dce73bba517907c44af2c2a618c4.tar.gz
rust-b58f647d5488dce73bba517907c44af2c2a618c4.zip
rename ptr::invalid -> ptr::without_provenance
also introduce ptr::dangling matching NonNull::dangling
Diffstat (limited to 'library/core/src/alloc')
-rw-r--r--library/core/src/alloc/layout.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs
index 9ef0a7d7608..2a02870e30b 100644
--- a/library/core/src/alloc/layout.rs
+++ b/library/core/src/alloc/layout.rs
@@ -215,7 +215,7 @@ impl Layout {
     #[inline]
     pub const fn dangling(&self) -> NonNull<u8> {
         // SAFETY: align is guaranteed to be non-zero
-        unsafe { NonNull::new_unchecked(crate::ptr::invalid_mut::<u8>(self.align())) }
+        unsafe { NonNull::new_unchecked(crate::ptr::without_provenance_mut::<u8>(self.align())) }
     }
 
     /// Creates a layout describing the record that can hold a value