This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -574,6 +574,8 @@ pub const fn null_mut<T: ?Sized + Thin>() -> *mut T {
574574
575575/// Creates a pointer with the given address and no provenance.
576576///
577+ /// This is equivalent to `ptr::null().with_addr(addr)`.
578+ ///
577579/// Without provenance, this pointer is not associated with any actual allocation. Such a
578580/// no-provenance pointer may be used for zero-sized memory accesses (if suitably aligned), but
579581/// non-zero-sized memory accesses with a no-provenance pointer are UB. No-provenance pointers are
@@ -616,6 +618,8 @@ pub const fn dangling<T>() -> *const T {
616618
617619/// Creates a pointer with the given address and no provenance.
618620///
621+ /// This is equivalent to `ptr::null_mut().with_addr(addr)`.
622+ ///
619623/// Without provenance, this pointer is not associated with any actual allocation. Such a
620624/// no-provenance pointer may be used for zero-sized memory accesses (if suitably aligned), but
621625/// non-zero-sized memory accesses with a no-provenance pointer are UB. No-provenance pointers are
You can’t perform that action at this time.
0 commit comments