about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2018-08-31 17:02:39 +0200
committerRalf Jung <post@ralfj.de>2018-08-31 17:02:39 +0200
commitb463871df555984fddf1d4cb59d12119a28e98df (patch)
treeca6040bf4da34d68bd55346d83c85873987474ab
parentdc2237c49fea94c8308f989c43f042a0cc327419 (diff)
downloadrust-b463871df555984fddf1d4cb59d12119a28e98df.tar.gz
rust-b463871df555984fddf1d4cb59d12119a28e98df.zip
(un)aligned
-rw-r--r--src/libcore/ptr.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index a6c3e544e16..adf107dca22 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -748,8 +748,8 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
 ///     // Take a reference to a 32-bit integer which is not aligned.
 ///     let unaligned = &mut x.unaligned as *mut u32;
 ///
-///     // Dereferencing normally will emit an unaligned store instruction,
-///     // causing undefined behavior.
+///     // Dereferencing normally will emit an aligned store instruction,
+///     // causing undefined behavior because the pointer is not aligned.
 ///     // *unaligned = v; // ERROR
 ///
 ///     // Instead, use `write_unaligned` to write improperly aligned values.