diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index dddeda7f02d..474658b65a1 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -476,6 +476,11 @@ pub unsafe fn write_volatile(dst: *mut T, src: T) { impl *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 *const T { impl *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: