|
10 | 10 |
|
11 | 11 | // FIXME: talk about offset, copy_memory, copy_nonoverlapping_memory
|
12 | 12 |
|
13 |
| -//! Manually manage memory through raw, unsafe pointers. |
| 13 | +//! Manually manage memory through raw pointers. |
14 | 14 | //!
|
15 | 15 | //! *[See also the pointer primitive types](../../std/primitive.pointer.html).*
|
16 | 16 |
|
@@ -438,6 +438,8 @@ pub unsafe fn read<T>(src: *const T) -> T {
|
438 | 438 | ///
|
439 | 439 | /// [`read`]: ./fn.read.html
|
440 | 440 | ///
|
| 441 | +/// # Safety |
| 442 | +/// |
441 | 443 | /// `read_unaligned` is unsafe because it dereferences a raw pointer. The caller
|
442 | 444 | /// must ensure that the pointer points to a valid value of type `T`.
|
443 | 445 | ///
|
@@ -525,8 +527,7 @@ pub unsafe fn read_unaligned<T>(src: *const T) -> T {
|
525 | 527 | ///
|
526 | 528 | /// # Undefined Behavior
|
527 | 529 | ///
|
528 |
| -/// `write` can trigger undefined behavior if any of the following conditions |
529 |
| -/// are violated: |
| 530 | +/// Behavior is undefined if any of the following conditions are violated: |
530 | 531 | ///
|
531 | 532 | /// * `dst` must point to valid memory.
|
532 | 533 | ///
|
@@ -603,8 +604,7 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
|
603 | 604 | ///
|
604 | 605 | /// # Undefined Behavior
|
605 | 606 | ///
|
606 |
| -/// `write_unaligned` can trigger undefined behavior if any of the following |
607 |
| -/// conditions are violated: |
| 607 | +/// Behavior is undefined if any of the following conditions are violated: |
608 | 608 | ///
|
609 | 609 | /// * `dst` must point to valid memory.
|
610 | 610 | ///
|
@@ -745,8 +745,7 @@ pub unsafe fn read_volatile<T>(src: *const T) -> T {
|
745 | 745 | ///
|
746 | 746 | /// # Undefined Behavior
|
747 | 747 | ///
|
748 |
| -/// `write_volatile` can trigger undefined behavior if any of the following |
749 |
| -/// conditions are violated: |
| 748 | +/// Behavior is undefined if any of the following conditions are violated: |
750 | 749 | ///
|
751 | 750 | /// * `dst` must point to valid memory.
|
752 | 751 | ///
|
|
0 commit comments