@@ -587,15 +587,15 @@ pub const fn invalid_mut<T>(addr: usize) -> *mut T {
587
587
588
588
/// Convert an address back to a pointer, picking up a previously 'exposed' provenance.
589
589
///
590
- /// This is equivalent to `addr as ptr `. The provenance of the returned pointer is that of *any*
591
- /// pointer that was previously passed to [`expose_addr`][pointer::expose_addr]. If there is no
592
- /// previously 'exposed' provenance that justifies the way this pointer will be used, the
593
- /// program has undefined behavior. Note that there is no algorithm that decides which
594
- /// provenance will be used. You can think of this as "guessing" the right provenance, and the
595
- /// guess will be "maximally in your favor", in the sense that if there is any way to avoid
596
- /// undefined behavior, then that is the guess that will be taken.
597
- ///
598
- /// On platforms with multiple address spaces, it is your responsibility to ensure the the
590
+ /// This is equivalent to `addr as *const T `. The provenance of the returned pointer is that of *any*
591
+ /// pointer that was previously passed to [`expose_addr`][pointer::expose_addr] or a `ptr as usize`
592
+ /// cast. If there is no previously 'exposed' provenance that justifies the way this pointer will be
593
+ /// used, the program has undefined behavior. Note that there is no algorithm that decides which
594
+ /// provenance will be used. You can think of this as "guessing" the right provenance, and the guess
595
+ /// will be "maximally in your favor", in the sense that if there is any way to avoid undefined
596
+ /// behavior, then that is the guess that will be taken.
597
+ ///
598
+ /// On platforms with multiple address spaces, it is your responsibility to ensure that the
599
599
/// address makes sense in the address space that this pointer will be used with.
600
600
///
601
601
/// Using this method means that code is *not* following strict provenance rules. "Guessing" a
@@ -623,15 +623,15 @@ where
623
623
624
624
/// Convert an address back to a mutable pointer, picking up a previously 'exposed' provenance.
625
625
///
626
- /// This is equivalent to `addr as ptr `. The provenance of the returned pointer is that of *any*
627
- /// pointer that was previously passed to [`expose_addr`][pointer::expose_addr]. If there is no
628
- /// previously 'exposed' provenance that justifies the way this pointer will be used, the
629
- /// program has undefined behavior. Note that there is no algorithm that decides which
630
- /// provenance will be used. You can think of this as "guessing" the right provenance, and the
631
- /// guess will be "maximally in your favor", in the sense that if there is any way to avoid
632
- /// undefined behavior, then that is the guess that will be taken.
626
+ /// This is equivalent to `addr as *mut T `. The provenance of the returned pointer is that of *any*
627
+ /// pointer that was previously passed to [`expose_addr`][pointer::expose_addr] or a `ptr as usize`
628
+ /// cast. If there is no previously 'exposed' provenance that justifies the way this pointer will be
629
+ /// used, the program has undefined behavior. Note that there is no algorithm that decides which
630
+ /// provenance will be used. You can think of this as "guessing" the right provenance, and the guess
631
+ /// will be "maximally in your favor", in the sense that if there is any way to avoid undefined
632
+ /// behavior, then that is the guess that will be taken.
633
633
///
634
- /// On platforms with multiple address spaces, it is your responsibility to ensure the the
634
+ /// On platforms with multiple address spaces, it is your responsibility to ensure that the
635
635
/// address makes sense in the address space that this pointer will be used with.
636
636
///
637
637
/// Using this method means that code is *not* following strict provenance rules. "Guessing" a
0 commit comments