Skip to content

Commit 107e371

Browse files
committed
fix the ptr::set_memory docstring
1 parent da9172a commit 107e371

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libstd/ptr.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ pub unsafe fn copy_nonoverlapping_memory<T>(dst: *mut T, src: *const T, count: u
161161
}
162162

163163
/**
164-
* Invokes memset on the specified pointer, setting `count` bytes of memory
165-
* starting at `dst` to `c`.
164+
* Invokes memset on the specified pointer, setting `count * size_of::<T>()`
165+
* bytes of memory starting at `dst` to `c`.
166166
*/
167167
#[inline(always)]
168168
#[cfg(target_word_size = "32", not(stage0))]
@@ -172,8 +172,8 @@ pub unsafe fn set_memory<T>(dst: *mut T, c: u8, count: uint) {
172172
}
173173

174174
/**
175-
* Invokes memset on the specified pointer, setting `count` bytes of memory
176-
* starting at `dst` to `c`.
175+
* Invokes memset on the specified pointer, setting `count * size_of::<T>()`
176+
* bytes of memory starting at `dst` to `c`.
177177
*/
178178
#[inline(always)]
179179
#[cfg(target_word_size = "64", not(stage0))]

0 commit comments

Comments
 (0)