@@ -134,7 +134,7 @@ mod mut_ptr;
134
134
///
135
135
/// Note that even if `T` has size `0`, the pointer must be non-NULL and properly aligned.
136
136
///
137
- /// [valid]: #safety
137
+ /// [valid]: self #safety
138
138
///
139
139
/// # Examples
140
140
///
@@ -316,7 +316,7 @@ pub const fn slice_from_raw_parts_mut<T>(data: *mut T, len: usize) -> *mut [T] {
316
316
///
317
317
/// Note that even if `T` has size `0`, the pointers must be non-NULL and properly aligned.
318
318
///
319
- /// [valid]: #safety
319
+ /// [valid]: self #safety
320
320
///
321
321
/// # Examples
322
322
///
@@ -394,7 +394,7 @@ pub unsafe fn swap<T>(x: *mut T, y: *mut T) {
394
394
/// Note that even if the effectively copied size (`count * size_of::<T>()`) is `0`,
395
395
/// the pointers must be non-NULL and properly aligned.
396
396
///
397
- /// [valid]: #safety
397
+ /// [valid]: self #safety
398
398
///
399
399
/// # Examples
400
400
///
@@ -533,7 +533,7 @@ unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
533
533
///
534
534
/// Note that even if `T` has size `0`, the pointer must be non-NULL and properly aligned.
535
535
///
536
- /// [valid]: #safety
536
+ /// [valid]: self #safety
537
537
///
538
538
/// # Examples
539
539
///
@@ -668,7 +668,7 @@ pub unsafe fn replace<T>(dst: *mut T, mut src: T) -> T {
668
668
/// assert_eq!(s, "bar");
669
669
/// ```
670
670
///
671
- /// [valid]: #safety
671
+ /// [valid]: self #safety
672
672
#[ inline]
673
673
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
674
674
pub unsafe fn read < T > ( src : * const T ) -> T {
@@ -706,7 +706,7 @@ pub unsafe fn read<T>(src: *const T) -> T {
706
706
/// Note that even if `T` has size `0`, the pointer must be non-NULL.
707
707
///
708
708
/// [read-ownership]: read#ownership-of-the-returned-value
709
- /// [valid]: #safety
709
+ /// [valid]: self #safety
710
710
///
711
711
/// ## On `packed` structs
712
712
///
@@ -809,7 +809,7 @@ pub unsafe fn read_unaligned<T>(src: *const T) -> T {
809
809
///
810
810
/// Note that even if `T` has size `0`, the pointer must be non-NULL and properly aligned.
811
811
///
812
- /// [valid]: #safety
812
+ /// [valid]: self #safety
813
813
///
814
814
/// # Examples
815
815
///
@@ -898,7 +898,7 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
898
898
///
899
899
/// Note that even if `T` has size `0`, the pointer must be non-NULL.
900
900
///
901
- /// [valid]: #safety
901
+ /// [valid]: self #safety
902
902
///
903
903
/// ## On `packed` structs
904
904
///
@@ -1010,7 +1010,7 @@ pub unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
1010
1010
///
1011
1011
/// Note that even if `T` has size `0`, the pointer must be non-NULL and properly aligned.
1012
1012
///
1013
- /// [valid]: #safety
1013
+ /// [valid]: self #safety
1014
1014
/// [read-ownership]: read#ownership-of-the-returned-value
1015
1015
///
1016
1016
/// Just like in C, whether an operation is volatile has no bearing whatsoever
@@ -1080,7 +1080,7 @@ pub unsafe fn read_volatile<T>(src: *const T) -> T {
1080
1080
///
1081
1081
/// Note that even if `T` has size `0`, the pointer must be non-NULL and properly aligned.
1082
1082
///
1083
- /// [valid]: #safety
1083
+ /// [valid]: self #safety
1084
1084
///
1085
1085
/// Just like in C, whether an operation is volatile has no bearing whatsoever
1086
1086
/// on questions involving concurrent access from multiple threads. Volatile
0 commit comments