Commit d0cec04
authored
Rollup merge of rust-lang#62493 - Freyskeyd:valid_example_read-write_unaligned, r=rkruppe
rust-lang#62357: doc(ptr): add example for {read,write}_unaligned
related to rust-lang#62357
> With rust-lang#62323 the only example (that had UB and was thus invalid) in std::ptr::read_unaligned and std::ptr::write_unaligned is removed.
> We should add a valid example of using the aforementioned functions.
Signed-off-by: Freyskeyd <simon.paitrault@gmail.com>1 file changed
+32
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
672 | 688 | | |
673 | 689 | | |
674 | 690 | | |
| |||
839 | 855 | | |
840 | 856 | | |
841 | 857 | | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
842 | 874 | | |
843 | 875 | | |
844 | 876 | | |
| |||
0 commit comments