|
28 | 28 | > _StructExprUnit_ : [_PathInExpression_]
|
29 | 29 |
|
30 | 30 | A *struct expression* creates a struct, enum, or union value.
|
31 |
| -It consists of a path to a [struct], [enum], or [union] item followed by the values for the fields of the item. |
| 31 | +It consists of a path to a [struct], [enum variant], or [union] item followed by the values for the fields of the item. |
32 | 32 | There are three forms of struct expressions: struct, tuple, and unit.
|
33 | 33 |
|
34 | 34 | The following are examples of struct expressions:
|
@@ -101,8 +101,7 @@ Point3d { x, y: y_value, z };
|
101 | 101 | ## Tuple struct expression
|
102 | 102 |
|
103 | 103 | A struct expression with fields enclosed in parentheses constructs a tuple struct.
|
104 |
| -Though it is listed here as a specific expression for completeness, it is equivalent to a [call expression] to the tuple struct's constructor. For example: <!-- |
105 |
| -This is false. Example: Position(0, ..other_position) --> |
| 104 | +Though it is listed here as a specific expression for completeness, it is equivalent to a [call expression] to the tuple struct's constructor. For example: |
106 | 105 |
|
107 | 106 | ```rust
|
108 | 107 | struct Position(i32, i32, i32);
|
@@ -135,7 +134,7 @@ let b = Gamma{}; // Exact same value as `a`.
|
135 | 134 | [_PathInExpression_]: ../paths.md#paths-in-expressions
|
136 | 135 | [attributes on block expressions]: block-expr.md#attributes-on-block-expressions
|
137 | 136 | [call expression]: call-expr.md
|
138 |
| -[enum]: ../items/enumerations.md |
| 137 | +[enum variant]: ../items/enumerations.md |
139 | 138 | [if let]: if-expr.md#if-let-expressions
|
140 | 139 | [if]: if-expr.md#if-expressions
|
141 | 140 | [loop]: loop-expr.md
|
|
0 commit comments