Skip to content

Commit 2de7d13

Browse files
committed
Fix links
1 parent 003c2a4 commit 2de7d13

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

library/core/src/ptr/volatile.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)