File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ struct Zst2(Zst1, Zst0);
146146#### Default layout of structs with a single non-zero-sized field
147147
148148The 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
151151For example, the layout of:
152152
@@ -161,8 +161,7 @@ is the same as the layout of `i32`, but the layout of:
161161struct 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
You can’t perform that action at this time.
0 commit comments