Skip to content

Commit 1ef7a4c

Browse files
committed
Document the abbreviation of zero-sized types.
Closes rust-lang#172 .
1 parent 1c44b54 commit 1ef7a4c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

reference/src/glossary.md

+7
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ niches. For example, the "all bits uninitialized" is an invalid bit-pattern for
7373
`&mut T`, but this bit-pattern cannot be used by layout optimizations, and is not a
7474
niche.
7575

76+
#### Zero-sized type / ZST
77+
78+
Types with zero size are called zero-sized types, which is abbreviated as "ZST".
79+
When the alignment of the type is relevant, the schema "N-ZST" which stands for
80+
"N-aligned zero-sized type" is used. For example: "1-ZST" stands for
81+
"one-aligned zero-sized type", that is, a type with a size of zero and an
82+
alignment requirement of one.
7683

7784
### TODO
7885

0 commit comments

Comments
 (0)