Skip to content

Commit

Permalink
ptr::{read,write}_unaligned: use no_run and reword slightly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril authored Jul 4, 2019
1 parent bee964c commit 54527db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libcore/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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")]
Expand Down Expand Up @@ -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,
Expand All @@ -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")]
Expand Down

0 comments on commit 54527db

Please sign in to comment.