diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-07-04 09:54:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-04 09:54:37 +0200 |
| commit | 54527db7b0316b3921f3f66bdc58cf3377c37902 (patch) | |
| tree | 427c2922e9d90fb67ebbe9091ab4e3883b0565a8 /src/libcore | |
| parent | bee964c50229d3c64616225fbf62be7125c704c7 (diff) | |
| download | rust-54527db7b0316b3921f3f66bdc58cf3377c37902.tar.gz rust-54527db7b0316b3921f3f66bdc58cf3377c37902.zip | |
ptr::{read,write}_unaligned: use no_run and reword slightly.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/ptr/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/ptr/mod.rs b/src/libcore/ptr/mod.rs index 7a33174d59f..acb9e52b255 100644 --- a/src/libcore/ptr/mod.rs +++ b/src/libcore/ptr/mod.rs @@ -662,7 +662,7 @@ pub unsafe fn read<T>(src: *const T) -> T { /// /// An example of what not to do and how this relates to `read_unaligned` is: /// -/// ``` +/// ```no_run /// #[repr(packed, C)] /// struct Packed { /// _padding: u8, @@ -689,7 +689,7 @@ pub unsafe fn read<T>(src: *const T) -> T { /// }; /// ``` /// -/// Accessing unaligned values directly with e.g. `packed.unaligned` is safe however. +/// Accessing unaligned fields directly with e.g. `packed.unaligned` is safe however. // FIXME: Update docs based on outcome of RFC #2582 and friends. #[inline] #[stable(feature = "ptr_unaligned", since = "1.17.0")] @@ -834,7 +834,7 @@ pub unsafe fn write<T>(dst: *mut T, src: T) { /// /// An example of what not to do and how this relates to `write_unaligned` is: /// -/// ``` +/// ```no_run /// #[repr(packed, C)] /// struct Packed { /// _padding: u8, @@ -859,7 +859,7 @@ pub unsafe fn write<T>(dst: *mut T, src: T) { /// }; /// ``` /// -/// Accessing unaligned values directly with e.g. `packed.unaligned` is safe however. +/// Accessing unaligned fields directly with e.g. `packed.unaligned` is safe however. // FIXME: Update docs based on outcome of RFC #2582 and friends. #[inline] #[stable(feature = "ptr_unaligned", since = "1.17.0")] |
