Document that there are many possible null pointers
This commit is contained in:
parent
8b2e09ffbb
commit
5c6118339a
1 changed files with 10 additions and 0 deletions
|
@ -476,6 +476,11 @@ pub unsafe fn write_volatile<T>(dst: *mut T, src: T) {
|
|||
impl<T: ?Sized> *const T {
|
||||
/// Returns `true` if the pointer is null.
|
||||
///
|
||||
/// Note that unsized types have many possible null pointers, as only the
|
||||
/// raw data pointer is considered, not their length, vtable, etc.
|
||||
/// Therefore, two pointers that are null may still not compare equal to
|
||||
/// each other.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
|
@ -1109,6 +1114,11 @@ impl<T: ?Sized> *const T {
|
|||
impl<T: ?Sized> *mut T {
|
||||
/// Returns `true` if the pointer is null.
|
||||
///
|
||||
/// Note that unsized types have many possible null pointers, as only the
|
||||
/// raw data pointer is considered, not their length, vtable, etc.
|
||||
/// Therefore, two pointers that are null may still not compare equal to
|
||||
/// each other.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
|
|
Loading…
Add table
Reference in a new issue