@@ -129,7 +129,7 @@ mod mut_ptr;
129
129
/// Additionally, if `T` is not [`Copy`], using the pointed-to value after
130
130
/// calling `drop_in_place` can cause undefined behavior. Note that `*to_drop =
131
131
/// foo` counts as a use because it will cause the value to be dropped
132
- /// again. [`write`] can be used to overwrite data without causing it to be
132
+ /// again. [`write() `] can be used to overwrite data without causing it to be
133
133
/// dropped.
134
134
///
135
135
/// Note that even if `T` has size `0`, the pointer must be non-NULL and properly aligned.
@@ -639,7 +639,7 @@ pub unsafe fn replace<T>(dst: *mut T, mut src: T) -> T {
639
639
/// `*src` can violate memory safety. Note that assigning to `*src` counts as a
640
640
/// use because it will attempt to drop the value at `*src`.
641
641
///
642
- /// [`write`] can be used to overwrite data without causing it to be dropped.
642
+ /// [`write() `] can be used to overwrite data without causing it to be dropped.
643
643
///
644
644
/// ```
645
645
/// use std::ptr;
@@ -878,7 +878,7 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
878
878
/// Overwrites a memory location with the given value without reading or
879
879
/// dropping the old value.
880
880
///
881
- /// Unlike [`write`], the pointer may be unaligned.
881
+ /// Unlike [`write() `], the pointer may be unaligned.
882
882
///
883
883
/// `write_unaligned` does not drop the contents of `dst`. This is safe, but it
884
884
/// could leak allocations or resources, so care should be taken not to overwrite
@@ -1085,7 +1085,7 @@ pub unsafe fn read_volatile<T>(src: *const T) -> T {
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
1087
1087
/// accesses behave exactly like non-atomic accesses in that regard. In particular,
1088
- /// a race between a [ `write_volatile`] and any other operation (reading or writing)
1088
+ /// a race between a `write_volatile` and any other operation (reading or writing)
1089
1089
/// on the same location is undefined behavior.
1090
1090
///
1091
1091
/// # Examples
0 commit comments