@@ -134,7 +134,7 @@ mod mut_ptr;
134134///
135135/// Note that even if `T` has size `0`, the pointer must be non-NULL and properly aligned.
136136///
137- /// [valid]: #safety
137+ /// [valid]: self #safety
138138///
139139/// # Examples
140140///
@@ -316,7 +316,7 @@ pub const fn slice_from_raw_parts_mut<T>(data: *mut T, len: usize) -> *mut [T] {
316316///
317317/// Note that even if `T` has size `0`, the pointers must be non-NULL and properly aligned.
318318///
319- /// [valid]: #safety
319+ /// [valid]: self #safety
320320///
321321/// # Examples
322322///
@@ -394,7 +394,7 @@ pub unsafe fn swap<T>(x: *mut T, y: *mut T) {
394394/// Note that even if the effectively copied size (`count * size_of::<T>()`) is `0`,
395395/// the pointers must be non-NULL and properly aligned.
396396///
397- /// [valid]: #safety
397+ /// [valid]: self #safety
398398///
399399/// # Examples
400400///
@@ -533,7 +533,7 @@ unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
533533///
534534/// Note that even if `T` has size `0`, the pointer must be non-NULL and properly aligned.
535535///
536- /// [valid]: #safety
536+ /// [valid]: self #safety
537537///
538538/// # Examples
539539///
@@ -668,7 +668,7 @@ pub unsafe fn replace<T>(dst: *mut T, mut src: T) -> T {
668668/// assert_eq!(s, "bar");
669669/// ```
670670///
671- /// [valid]: #safety
671+ /// [valid]: self #safety
672672#[ inline]
673673#[ stable( feature = "rust1" , since = "1.0.0" ) ]
674674pub unsafe fn read < T > ( src : * const T ) -> T {
@@ -706,7 +706,7 @@ pub unsafe fn read<T>(src: *const T) -> T {
706706/// Note that even if `T` has size `0`, the pointer must be non-NULL.
707707///
708708/// [read-ownership]: read#ownership-of-the-returned-value
709- /// [valid]: #safety
709+ /// [valid]: self #safety
710710///
711711/// ## On `packed` structs
712712///
@@ -809,7 +809,7 @@ pub unsafe fn read_unaligned<T>(src: *const T) -> T {
809809///
810810/// Note that even if `T` has size `0`, the pointer must be non-NULL and properly aligned.
811811///
812- /// [valid]: #safety
812+ /// [valid]: self #safety
813813///
814814/// # Examples
815815///
@@ -898,7 +898,7 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
898898///
899899/// Note that even if `T` has size `0`, the pointer must be non-NULL.
900900///
901- /// [valid]: #safety
901+ /// [valid]: self #safety
902902///
903903/// ## On `packed` structs
904904///
@@ -1010,7 +1010,7 @@ pub unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
10101010///
10111011/// Note that even if `T` has size `0`, the pointer must be non-NULL and properly aligned.
10121012///
1013- /// [valid]: #safety
1013+ /// [valid]: self #safety
10141014/// [read-ownership]: read#ownership-of-the-returned-value
10151015///
10161016/// 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 {
10801080///
10811081/// Note that even if `T` has size `0`, the pointer must be non-NULL and properly aligned.
10821082///
1083- /// [valid]: #safety
1083+ /// [valid]: self #safety
10841084///
10851085/// Just like in C, whether an operation is volatile has no bearing whatsoever
10861086/// on questions involving concurrent access from multiple threads. Volatile
0 commit comments