Resolve null/ZST conflict correctly (whoops)
This commit is contained in:
parent
7e165d90a6
commit
c8da321581
1 changed files with 3 additions and 4 deletions
|
@ -42,10 +42,9 @@
|
|||
//!
|
||||
//! * The result of casting a reference to a pointer is valid for as long as the
|
||||
//! underlying object is live.
|
||||
//! * All pointers to types with a [size of zero][zst] are valid for all
|
||||
//! operations of size zero.
|
||||
//! * A [null] pointer is *never* valid, except when it points to a zero-sized
|
||||
//! type.
|
||||
//! * A [null] pointer is *never* valid.
|
||||
//! * All pointers (except for the null pointer) are valid for all operations of
|
||||
//! [size zero][zst].
|
||||
//!
|
||||
//! These axioms, along with careful use of [`offset`] for pointer arithmentic,
|
||||
//! are enough to correctly implement many useful things in unsafe code. Still,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue