doc clarify struct size and ABI-alignment

This commit is contained in:
Michael Dusan 2019-07-11 17:40:54 -04:00 committed by Andrew Kelley
parent c7a976972f
commit 1766bd8a08

View File

@ -2132,8 +2132,8 @@ test "slice widening" {
{#header_open|struct#}
{#code_begin|test|structs#}
// Declare a struct.
// Zig gives no guarantees about the order of fields and whether or
// not there will be padding.
// Zig gives no guarantees about the order of fields and the size of
// the struct but the fields are guaranteed to be ABI-aligned.
const Point = struct {
x: f32,
y: f32,