@@ -557,16 +557,16 @@ pub const fn null_mut<T>() -> *mut T {
557557
558558/// Creates an invalid pointer with the given address.
559559///
560- /// This is *currently* equivalent to `addr as *const T` but it expresses the intended semantic
561- /// more clearly, and may become important under future memory models .
560+ /// This is different from `addr as *const T`, which creates a pointer that picks up a previously
561+ /// exposed provenance. See [`from_exposed_addr`] for more details on that operation .
562562///
563563/// The module's top-level documentation discusses the precise meaning of an "invalid"
564564/// pointer but essentially this expresses that the pointer is not associated
565565/// with any actual allocation and is little more than a usize address in disguise.
566566///
567567/// This pointer will have no provenance associated with it and is therefore
568568/// UB to read/write/offset. This mostly exists to facilitate things
569- /// like ptr::null and NonNull::dangling which make invalid pointers.
569+ /// like ` ptr::null` and ` NonNull::dangling` which make invalid pointers.
570570///
571571/// (Standard "Zero-Sized-Types get to cheat and lie" caveats apply, although it
572572/// may be desirable to give them their own API just to make that 100% clear.)
@@ -588,16 +588,16 @@ pub const fn invalid<T>(addr: usize) -> *const T {
588588
589589/// Creates an invalid mutable pointer with the given address.
590590///
591- /// This is *currently* equivalent to `addr as *mut T` but it expresses the intended semantic
592- /// more clearly, and may become important under future memory models .
591+ /// This is different from `addr as *mut T`, which creates a pointer that picks up a previously
592+ /// exposed provenance. See [`from_exposed_addr_mut`] for more details on that operation .
593593///
594594/// The module's top-level documentation discusses the precise meaning of an "invalid"
595595/// pointer but essentially this expresses that the pointer is not associated
596596/// with any actual allocation and is little more than a usize address in disguise.
597597///
598598/// This pointer will have no provenance associated with it and is therefore
599599/// UB to read/write/offset. This mostly exists to facilitate things
600- /// like ptr::null and NonNull::dangling which make invalid pointers.
600+ /// like ` ptr::null` and ` NonNull::dangling` which make invalid pointers.
601601///
602602/// (Standard "Zero-Sized-Types get to cheat and lie" caveats apply, although it
603603/// may be desirable to give them their own API just to make that 100% clear.)
0 commit comments