about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-07-21 12:08:19 +0200
committerRalf Jung <post@ralfj.de>2019-07-21 12:08:19 +0200
commitf502bf78cba8974cdfbd20f3b524d86b982e5e2b (patch)
treeb7b094a6ce042616a605d73dbd00eed2e39c43ab /src/libstd
parent2e6b13a649ce4a8f5a608d10133dd2b4b30c35c1 (diff)
downloadrust-f502bf78cba8974cdfbd20f3b524d86b982e5e2b.tar.gz
rust-f502bf78cba8974cdfbd20f3b524d86b982e5e2b.zip
sync with nomicon: raw ptr must be non-dangling and aligned every time it is dereferenced
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/primitive_docs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs
index 95b803e3461..0f66e8cd47e 100644
--- a/src/libstd/primitive_docs.rs
+++ b/src/libstd/primitive_docs.rs
@@ -363,8 +363,8 @@ mod prim_unit { }
 /// *[See also the `std::ptr` module](ptr/index.html).*
 ///
 /// Working with raw pointers in Rust is uncommon, typically limited to a few patterns.
-/// Raw pointers can be unaligned or null when unused. However, when a raw pointer is used to
-/// load/store data from/to memory, they must be non-null and aligned.
+/// Raw pointers can be unaligned or null when unused. However, when a raw pointer is
+/// dereferenced (using the `*` operator), it must be non-null and aligned.
 /// Storing through a raw pointer (`*ptr = data`) calls `drop` on the old value, so
 /// [`write`] must be used if memory is not already initialized.
 ///