rename ptr::invalid -> ptr::without_provenance
also introduce ptr::dangling matching NonNull::dangling
This commit is contained in:
parent
1d447a9946
commit
b58f647d54
56 changed files with 304 additions and 233 deletions
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue