From 5c147cc40847da033674663cedabaf515eda8b20 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Tue, 17 Dec 2013 00:06:13 +1100 Subject: [PATCH] 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. --- src/libstd/vec.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index ed58185e3b03..a0c94e6810ac 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -2350,13 +2350,10 @@ pub mod bytes { } } - /** - * Copies data from one vector to another. - * - * Copies `src` to `dst`. The source and destination may - * overlap. Fails if the length of `dst` is less than the length - * of `src`. - */ + /// Copies data from one vector to another. + /// + /// Copies `src` to `dst`. Fails if the length of `dst` is less + /// than the length of `src`. #[inline] pub fn copy_memory(dst: &mut [u8], src: &[u8]) { // Bound checks are done at .copy_memory.