@@ -32,16 +32,17 @@ use crate::{cfg_match, intrinsics};
3232///
3333/// * `src` must point to a properly initialized value of type `T`.
3434///
35- /// Like [` read` ], `read_volatile` creates a bitwise copy of `T`, regardless of
35+ /// Like [read], `read_volatile` creates a bitwise copy of `T`, regardless of
3636/// whether `T` is [`Copy`]. If `T` is not [`Copy`], using both the returned
3737/// value and the value at `*src` can [violate memory safety][read-ownership].
3838/// However, storing non-[`Copy`] types in volatile memory is almost certainly
3939/// incorrect.
4040///
4141/// Note that even if `T` has size `0`, the pointer must be properly aligned.
4242///
43- /// [valid]: self#safety
44- /// [read-ownership]: read#ownership-of-the-returned-value
43+ /// [valid]: crate::ptr#safety
44+ /// [read-ownership]: crate::ptr::read#ownership-of-the-returned-value
45+ /// [read]: crate::ptr::read
4546///
4647/// Just like in C, whether an operation is volatile has no bearing whatsoever
4748/// on questions involving concurrent access from multiple threads. Volatile
@@ -165,7 +166,7 @@ pub unsafe fn read_volatile<T>(src: *const T) -> T {
165166///
166167/// Note that even if `T` has size `0`, the pointer must be properly aligned.
167168///
168- /// [valid]: self #safety
169+ /// [valid]: crate::ptr #safety
169170///
170171/// Just like in C, whether an operation is volatile has no bearing whatsoever
171172/// on questions involving concurrent access from multiple threads. Volatile
0 commit comments