about summary refs log tree commit diff
path: root/library/core/src/ptr
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-09-05 17:20:31 +0200
committerGitHub <noreply@github.com>2023-09-05 17:20:31 +0200
commit4684ffaf2ac5c7bb1467baf4e7f01469488c8ef2 (patch)
tree00502b6ef36c6a2242fc2487d344b634f015562b /library/core/src/ptr
parent0188b9cbb43c2631111281fad0624f8bb0538e3a (diff)
downloadrust-4684ffaf2ac5c7bb1467baf4e7f01469488c8ef2.tar.gz
rust-4684ffaf2ac5c7bb1467baf4e7f01469488c8ef2.zip
if -> when
Diffstat (limited to 'library/core/src/ptr')
-rw-r--r--library/core/src/ptr/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs
index 69d775075f3..452800516f7 100644
--- a/library/core/src/ptr/mod.rs
+++ b/library/core/src/ptr/mod.rs
@@ -795,7 +795,7 @@ pub const fn slice_from_raw_parts_mut<T>(data: *mut T, len: usize) -> *mut [T] {
 ///
 /// Behavior is undefined if any of the following conditions are violated:
 ///
-/// * Both `x` and `y` must be [valid] for both reads and writes. They must remain valid even if the
+/// * Both `x` and `y` must be [valid] for both reads and writes. They must remain valid even when the
 ///   other pointer is written. (This means if the memory ranges overlap, the two pointers must not
 ///   be subject to aliasing restrictions relative to each other.)
 ///