Commit be1b304
authored
Rollup merge of rust-lang#75943 - elichai:2020-align_offset-docs, r=RalfJung
Fix potential UB in align_offset doc examples
Currently it takes a pointer only to the first element in the array, this changes the code to take a pointer to the whole array.
miri can't catch this right now because it later calls `x.len()` which re-tags the pointer for the whole array.
rust-lang/miri#1526 (comment)2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
839 | | - | |
| 839 | + | |
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1094 | 1094 | | |
1095 | 1095 | | |
1096 | 1096 | | |
1097 | | - | |
| 1097 | + | |
1098 | 1098 | | |
1099 | 1099 | | |
1100 | 1100 | | |
| |||
0 commit comments