File tree 1 file changed +4
-3
lines changed
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);
146
146
#### Default layout of structs with a single non-zero-sized field
147
147
148
148
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 ]
150
150
151
151
For example, the layout of:
152
152
@@ -161,8 +161,7 @@ is the same as the layout of `i32`, but the layout of:
161
161
struct SomeOtherStruct (i32 , Zst );
162
162
```
163
163
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] .
166
165
167
166
#### Unresolved questions
168
167
@@ -423,3 +422,5 @@ proposal (and -- further -- it does not match our existing behavior):
423
422
thread] ( https://github.com/rust-rfcs/unsafe-code-guidelines/pull/31#discussion_r224955817 ) ).
424
423
- Many people would prefer the name ordering to be chosen for
425
424
"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