diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index bafc37469b32f..d0b0b74edff87 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -49,6 +49,10 @@ use crate::{fmt, hash, intrinsics, mem, ptr}; /// /// # Representation /// +/// `NonNull` is guaranteed to be ABI-compatible with `*const T`, +/// `*mut T`, `&T`, `&mut T`, and `Box` for all `T`, but its +/// pointer must not be null. +/// /// Thanks to the [null pointer optimization], /// `NonNull` and `Option>` /// are guaranteed to have the same size and alignment: