File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -267,7 +267,9 @@ the field values of a new instance of the struct. A field name can be any
267
267
[ identifier] ( identifiers.html ) , and is separated from its value expression by a
268
268
colon. In the case of a tuple struct the field names are numbers corresponding
269
269
to the position of the field. The numbers must be written in decimal,
270
- containing no underscores and with no leading zeros or integer suffix.
270
+ containing no underscores and with no leading zeros or integer suffix. A value
271
+ of a [ union] ( items.html#unions ) type can also be created using this syntax,
272
+ except that it must specify exactly one field.
271
273
272
274
Struct expressions can't be used directly in the head of a [ loop] ( #loops ) or an
273
275
[ ` if ` ] ( #if-expressions ) , [ ` if let ` ] ( #if-let-expressions ) or
You can’t perform that action at this time.
0 commit comments