Skip to content

Commit 5c147cc

Browse files
committed
std::vec::bytes: remove the reference to overlapping src and dest in
docs for copy_memory. &mut [u8] and &[u8] really shouldn't be overlapping at all (part of the uniqueness/aliasing guarantee of &mut), so no point in encouraging it.
1 parent d0ae820 commit 5c147cc

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/libstd/vec.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2350,13 +2350,10 @@ pub mod bytes {
23502350
}
23512351
}
23522352

2353-
/**
2354-
* Copies data from one vector to another.
2355-
*
2356-
* Copies `src` to `dst`. The source and destination may
2357-
* overlap. Fails if the length of `dst` is less than the length
2358-
* of `src`.
2359-
*/
2353+
/// Copies data from one vector to another.
2354+
///
2355+
/// Copies `src` to `dst`. Fails if the length of `dst` is less
2356+
/// than the length of `src`.
23602357
#[inline]
23612358
pub fn copy_memory(dst: &mut [u8], src: &[u8]) {
23622359
// Bound checks are done at .copy_memory.

0 commit comments

Comments
 (0)