Skip to content

Commit b281933

Browse files
committed
Use 1-ZST terminology
1 parent 3056194 commit b281933

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

reference/src/layout/structs-and-tuples.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ struct Zst2(Zst1, Zst0);
146146
#### Default layout of structs with a single non-zero-sized field
147147

148148
The default layout of structs with a single non-zero-sized field is the same as
149-
the layout of that field if the alignment requirement of all other fields is 1.
149+
the layout of that field if all other fields are [1-ZST]
150150

151151
For example, the layout of:
152152

@@ -161,8 +161,7 @@ is the same as the layout of `i32`, but the layout of:
161161
struct SomeOtherStruct(i32, Zst);
162162
```
163163

164-
is **unspecified**, since there is a zero-sized field in `SomeOtherStruct` with
165-
alignment greater than 1.
164+
is **unspecified**, since `Zst` is not a [1-ZST].
166165

167166
#### Unresolved questions
168167

@@ -423,3 +422,5 @@ proposal (and -- further -- it does not match our existing behavior):
423422
thread](https://github.com/rust-rfcs/unsafe-code-guidelines/pull/31#discussion_r224955817)).
424423
- Many people would prefer the name ordering to be chosen for
425424
"readability" and not optimal layout.
425+
426+
[1-ZST]: ../glossary.md#zero-sized-type--zst

0 commit comments

Comments
 (0)