We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a514afe commit 8c55428Copy full SHA for 8c55428
src/type-layout.md
@@ -70,10 +70,9 @@ at least equal to the size and alignment of a pointer.
70
71
## Array Layout
72
73
-Arrays are laid out so that the `nth` element of the array is offset from the
74
-start of the array by `(n-1) * the size of the type` bytes i.e. the `1st`
75
-element has an offset of 0. An array of `[T; n]` has a size of
76
-`size_of::<T>() * n` and the same alignment of `T`.
+An array of `[T; N]` has a size of `size_of::<T>() * N` and the same alignment
+of `T`. Arrays are laid out so that the zero-indexed `n`th element of the array
+is offset from the start of the array by `n * size_of::<T>()` bytes.
77
78
## Slice Layout
79
0 commit comments