@@ -976,17 +976,17 @@ extern "rust-intrinsic" {
976
976
///
977
977
/// Behavior is undefined if any of the following conditions are violated:
978
978
///
979
- /// * Both `src` and `dst` must be [valid].
980
- ///
981
979
/// * Both `src` and `dst` must be properly aligned.
982
980
///
983
- /// * `src.offset(count-1)` must be [valid]. In other words, the region of
984
- /// memory which begins at `src` and has a length of `count *
985
- /// size_of::<T>()` bytes must belong to a single, live allocation.
981
+ /// * `src.offset(i)` must be [valid] for all `i` in `0..count`. In other
982
+ /// words, the region of memory which begins at `src` and has a length of
983
+ /// `count * size_of::<T>()` bytes must belong to a single, live
984
+ /// allocation.
986
985
///
987
- /// * `dst.offset(count-1)` must be [valid]. In other words, the region of
988
- /// memory which begins at `dst` and has a length of `count *
989
- /// size_of::<T>()` bytes must belong to a single, live allocation.
986
+ /// * `dst.offset(i)` must be [valid] for all `i` in `0..count`. In other
987
+ /// words, the region of memory which begins at `dst` and has a length of
988
+ /// `count * size_of::<T>()` bytes must belong to a single, live
989
+ /// allocation.
990
990
///
991
991
/// * The two regions of memory must *not* overlap.
992
992
///
@@ -1064,17 +1064,17 @@ extern "rust-intrinsic" {
1064
1064
///
1065
1065
/// Behavior is undefined if any of the following conditions are violated:
1066
1066
///
1067
- /// * Both `src` and `dst` must be [valid].
1068
- ///
1069
1067
/// * Both `src` and `dst` must be properly aligned.
1070
1068
///
1071
- /// * `src.offset(count-1)` must be [valid]. In other words, the region of
1072
- /// memory which begins at `src` and has a length of `count *
1073
- /// size_of::<T>()` bytes must belong to a single, live allocation.
1069
+ /// * `src.offset(i)` must be [valid] for all `i` in `0..count`. In other
1070
+ /// words, the region of memory which begins at `src` and has a length of
1071
+ /// `count * size_of::<T>()` bytes must belong to a single, live
1072
+ /// allocation.
1074
1073
///
1075
- /// * `dst.offset(count-1)` must be [valid]. In other words, the region of
1076
- /// memory which begins at `dst` and has a length of `count *
1077
- /// size_of::<T>()` bytes must belong to a single, live allocation.
1074
+ /// * `dst.offset(i)` must be [valid] for all `i` in `0..count`. In other
1075
+ /// words, the region of memory which begins at `dst` and has a length of
1076
+ /// `count * size_of::<T>()` bytes must belong to a single, live
1077
+ /// allocation.
1078
1078
///
1079
1079
/// Like [`read`], `copy` creates a bitwise copy of `T`, regardless of
1080
1080
/// whether `T` is [`Copy`]. If `T` is not [`Copy`], using both the values
@@ -1116,14 +1116,13 @@ extern "rust-intrinsic" {
1116
1116
///
1117
1117
/// Behavior is undefined if any of the following conditions are violated:
1118
1118
///
1119
- /// * `dst` must be [valid].
1120
- ///
1121
- /// * `dst.offset(count-1)` must be [valid]. In other words, the region of
1122
- /// memory which begins at `dst` and has a length of `count *
1123
- /// size_of::<T>()` bytes must belong to a single, live allocation.
1124
- ///
1125
1119
/// * `dst` must be properly aligned.
1126
1120
///
1121
+ /// * `dst.offset(i)` must be [valid] for all `i` in `0..count`. In other
1122
+ /// words, the region of memory which begins at `dst` and has a length of
1123
+ /// `count * size_of::<T>()` bytes must belong to a single, live
1124
+ /// allocation.
1125
+ ///
1127
1126
/// Additionally, the caller must ensure that writing `count *
1128
1127
/// size_of::<T>()` bytes to the given region of memory results in a valid
1129
1128
/// value of `T`. Creating an invalid value of `T` can result in undefined
0 commit comments