File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ Primitives are usually aligned to their size, although this is
11
11
platform-specific behavior. For example, on x86 ` u64 ` and ` f64 ` are often
12
12
aligned to 4 bytes (32 bits).
13
13
14
- A type's size must always be a multiple of its alignment. This ensures that an
15
- array of that type may always be indexed by offsetting by a multiple of its
16
- size. Note that the size and alignment of a type may not be known
17
- statically in the case of [ dynamically sized types] [ dst ] .
14
+ A type's size must always be a multiple of its alignment (Zero being a valid size
15
+ for any alignment). This ensures that an array of that type may always be indexed
16
+ by offsetting by a multiple of its size. Note that the size and alignment of a
17
+ type may not be known statically in the case of [ dynamically sized types] [ dst ] .
18
18
19
19
Rust gives you the following ways to lay out composite data:
20
20
You can’t perform that action at this time.
0 commit comments