Skip to content

Commit 36bc3b6

Browse files
committed
Use <---> for padding in pictures
1 parent 58c5694 commit 36bc3b6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

reference/src/layout/unions.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ situated, i.e., the compiler picks the gap (often called padding) before and
2020
after each field. This can be visualized as follows:
2121

2222
```rust,ignore
23-
[ P P [field0_ty] P P P P ]
24-
[ P P P P [field1_ty] P P ]
25-
[ P P P [field2_ty] P P P ]
23+
[ <--> [field0_ty] <----> ]
24+
[ <----> [field1_ty] <--> ]
25+
[ <---> [field2_ty] <---> ]
2626
```
2727

2828
> **Figure: union field layout**: Each row in the picture shows the layout of
2929
> the union for each of its fields, where the square brackets `[]` depict an
30-
> array of bytes. Here, `P` is a byte of type `Pad` and `[field{i}_ty]` is the
31-
> bytes of the type of the `i`-th union field.
30+
> array of bytes, `<-...->` denotes different amount of padding, and
31+
> `[field{i}_ty]` is the bytes of the type of the `i`-th union field.
3232
3333
The individual fields (`[field{i}_ty_]`) are blocks of fixed size determined by
3434
the field's layout. The compiler picks the offset of the fields with respect to

0 commit comments

Comments
 (0)