1
Fork 0

rename ptr::invalid -> ptr::without_provenance

also introduce ptr::dangling matching NonNull::dangling
This commit is contained in:
Ralf Jung 2024-02-11 19:04:29 +01:00
parent 1d447a9946
commit b58f647d54
56 changed files with 304 additions and 233 deletions

View file

@ -95,7 +95,7 @@ impl<T> ArenaChunk<T> {
unsafe {
if mem::size_of::<T>() == 0 {
// A pointer as large as possible for zero-sized elements.
ptr::invalid_mut(!0)
ptr::without_provenance_mut(!0)
} else {
self.start().add(self.storage.len())
}