@@ -2060,7 +2060,7 @@ pub trait MutableVector<'a, T> {
2060
2060
*/
2061
2061
unsafe fn init_elem ( self , i : uint , val : T ) ;
2062
2062
2063
- /// Copies data from `src` to `self`
2063
+ /// Copies data from `src` to `self`.
2064
2064
///
2065
2065
/// `self` and `src` must not overlap. Fails if `self` is
2066
2066
/// shorter than `src`.
@@ -2208,7 +2208,7 @@ impl<'a,T> MutableVector<'a, T> for &'a mut [T] {
2208
2208
self . as_mut_buf ( |p_dst, len_dst| {
2209
2209
src. as_imm_buf ( |p_src, len_src| {
2210
2210
assert ! ( len_dst >= len_src)
2211
- ptr:: copy_memory ( p_dst, p_src, len_src)
2211
+ ptr:: copy_nonoverlapping_memory ( p_dst, p_src, len_src)
2212
2212
} )
2213
2213
} )
2214
2214
}
@@ -2350,10 +2350,10 @@ pub mod bytes {
2350
2350
}
2351
2351
}
2352
2352
2353
- /// Copies data from one vector to another.
2353
+ /// Copies data from `src` to `dst`
2354
2354
///
2355
- /// Copies `src` to `dst`. Fails if the length of `dst` is less
2356
- /// than the length of `src`.
2355
+ /// `src` and `dst` must not overlap . Fails if the length of `dst`
2356
+ /// is less than the length of `src`.
2357
2357
#[ inline]
2358
2358
pub fn copy_memory ( dst : & mut [ u8 ] , src : & [ u8 ] ) {
2359
2359
// Bound checks are done at .copy_memory.
0 commit comments