Skip to content

Commit 4684ffa

Browse files
authored
if -> when
1 parent 0188b9c commit 4684ffa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

library/core/src/intrinsics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2706,12 +2706,12 @@ pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: us
27062706
/// Behavior is undefined if any of the following conditions are violated:
27072707
///
27082708
/// * `src` must be [valid] for reads of `count * size_of::<T>()` bytes, and must remain valid even
2709-
/// if `dst` is written for `count * size_of::<T>()` bytes. (This means if the memory ranges
2709+
/// when `dst` is written for `count * size_of::<T>()` bytes. (This means if the memory ranges
27102710
/// overlap, the two pointers must not be subject to aliasing restrictions relative to each
27112711
/// other.)
27122712
///
27132713
/// * `dst` must be [valid] for writes of `count * size_of::<T>()` bytes, and must remain valid even
2714-
/// if `src` is read for `count * size_of::<T>()` bytes.
2714+
/// when `src` is read for `count * size_of::<T>()` bytes.
27152715
///
27162716
/// * Both `src` and `dst` must be properly aligned.
27172717
///

library/core/src/ptr/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ pub const fn slice_from_raw_parts_mut<T>(data: *mut T, len: usize) -> *mut [T] {
795795
///
796796
/// Behavior is undefined if any of the following conditions are violated:
797797
///
798-
/// * Both `x` and `y` must be [valid] for both reads and writes. They must remain valid even if the
798+
/// * Both `x` and `y` must be [valid] for both reads and writes. They must remain valid even when the
799799
/// other pointer is written. (This means if the memory ranges overlap, the two pointers must not
800800
/// be subject to aliasing restrictions relative to each other.)
801801
///

0 commit comments

Comments
 (0)