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 7cf4405 commit 23427d8Copy full SHA for 23427d8
core/src/ptr/mod.rs
@@ -767,6 +767,7 @@ pub const unsafe fn read<T>(src: *const T) -> T {
767
/// unaligned: 0x01020304,
768
/// };
769
///
770
+/// #[allow(unaligned_references)]
771
/// let v = unsafe {
772
/// // Here we attempt to take the address of a 32-bit integer which is not aligned.
773
/// let unaligned =
@@ -960,6 +961,7 @@ pub const unsafe fn write<T>(dst: *mut T, src: T) {
960
961
/// let v = 0x01020304;
962
/// let mut packed: Packed = unsafe { std::mem::zeroed() };
963
964
965
966
967
0 commit comments