]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/intrinsics.rs
Fix off-by-one error when specifying a valid range
[rust.git] / src / libcore / intrinsics.rs
index 1c400cbdfcb393685b8e410367d51161102f66c8..ba16715a6b88f54d67de9b749a368e08680d5719 100644 (file)
     ///
     /// * Both `src` and `dst` must be properly aligned.
     ///
-    /// * `src.offset(count)` must be [valid]. In other words, the region of
+    /// * `src.offset(count-1)` must be [valid]. In other words, the region of
     ///   memory which begins at `src` and has a length of `count *
     ///   size_of::<T>()` bytes must belong to a single, live allocation.
     ///
-    /// * `dst.offset(count)` must be [valid]. In other words, the region of
+    /// * `dst.offset(count-1)` must be [valid]. In other words, the region of
     ///   memory which begins at `dst` and has a length of `count *
     ///   size_of::<T>()` bytes must belong to a single, live allocation.
     ///
     ///
     /// * Both `src` and `dst` must be properly aligned.
     ///
-    /// * `src.offset(count)` must be [valid]. In other words, the region of
+    /// * `src.offset(count-1)` must be [valid]. In other words, the region of
     ///   memory which begins at `src` and has a length of `count *
     ///   size_of::<T>()` bytes must belong to a single, live allocation.
     ///
-    /// * `dst.offset(count)` must be [valid]. In other words, the region of
+    /// * `dst.offset(count-1)` must be [valid]. In other words, the region of
     ///   memory which begins at `dst` and has a length of `count *
     ///   size_of::<T>()` bytes must belong to a single, live allocation.
     ///
     ///
     /// * `dst` must be [valid].
     ///
-    /// * `dst.offset(count)` must be [valid]. In other words, the region of
+    /// * `dst.offset(count-1)` must be [valid]. In other words, the region of
     ///   memory which begins at `dst` and has a length of `count *
     ///   size_of::<T>()` bytes must belong to a single, live allocation.
     ///