Skip to content

Commit 09142b8

Browse files
committed
Use 'field' in tuple-indexing exprs
1 parent ff6c3dc commit 09142b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/expressions/tuple-expr.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ The syntax for the *tuple index* is a [decimal literal] with no leading zeros, u
4646
For example `0` and `2` are valid tuple indices but not `01`, `0_`, nor `0i32`.
4747

4848
The type of the tuple operand must be a [tuple type] or a [tuple struct].
49-
The tuple index must be an element of the tuple operand.
49+
The tuple index must be a name of a field of the type of the tuple operand.
5050

5151
Evaluation of tuple index expressions has no side effects beyond evaluation of its tuple operand.
52-
As a [place expression] expression, it evaluates to the location of the element of the tuple operand with the same number as the tuple index.
52+
As a [place expression], it evaluates to the location of the field of the tuple operand with the same name as the tuple index.
5353

5454
Examples of tuple indexing expressions:
5555

0 commit comments

Comments
 (0)