We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc2237c commit b463871Copy full SHA for b463871
src/libcore/ptr.rs
@@ -748,8 +748,8 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
748
/// // Take a reference to a 32-bit integer which is not aligned.
749
/// let unaligned = &mut x.unaligned as *mut u32;
750
///
751
-/// // Dereferencing normally will emit an unaligned store instruction,
752
-/// // causing undefined behavior.
+/// // Dereferencing normally will emit an aligned store instruction,
+/// // causing undefined behavior because the pointer is not aligned.
753
/// // *unaligned = v; // ERROR
754
755
/// // Instead, use `write_unaligned` to write improperly aligned values.
0 commit comments