Skip to content

Commit ca030dd

Browse files
authored
Merge pull request #4240 from kpreid/patch-1
Appendix B, Operators: Replace “member access” with “field access” and “method call”.
2 parents c7edf19 + 0833386 commit ca030dd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/appendix-02-operators.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ overload that operator is listed.
3737
| `-` | `expr - expr` | Arithmetic subtraction | `Sub` |
3838
| `-=` | `var -= expr` | Arithmetic subtraction and assignment | `SubAssign` |
3939
| `->` | `fn(...) -> type`, <code>&vert;...&vert; -> type</code> | Function and closure return type | |
40-
| `.` | `expr.ident` | Member access | |
40+
| `.` | `expr.ident` | Field access | |
41+
| `.` | `expr.ident(expr, ...)` | Method call | |
42+
| `.` | `expr.0`, `expr.1`, etc. | Tuple indexing | |
4143
| `..` | `..`, `expr..`, `..expr`, `expr..expr` | Right-exclusive range literal | `PartialOrd` |
4244
| `..=` | `..=expr`, `expr..=expr` | Right-inclusive range literal | `PartialOrd` |
4345
| `..` | `..expr` | Struct literal update syntax | |
@@ -168,9 +170,9 @@ Table B-7 shows symbols that create comments.
168170
| `/*!...*/` | Inner block doc comment |
169171
| `/**...*/` | Outer block doc comment |
170172

171-
Table B-8 shows symbols that appear in the context of using tuples.
173+
Table B-8 shows the contexts in which parentheses are used.
172174

173-
<span class="caption">Table B-8: Tuples</span>
175+
<span class="caption">Table B-8: Parentheses</span>
174176

175177
| Symbol | Explanation |
176178
| ------------------------ | ------------------------------------------------------------------------------------------- |
@@ -181,7 +183,6 @@ Table B-8 shows symbols that appear in the context of using tuples.
181183
| `(expr, ...)` | Tuple expression |
182184
| `(type, ...)` | Tuple type |
183185
| `expr(expr, ...)` | Function call expression; also used to initialize tuple `struct`s and tuple `enum` variants |
184-
| `expr.0`, `expr.1`, etc. | Tuple indexing |
185186

186187
Table B-9 shows the contexts in which curly braces are used.
187188

0 commit comments

Comments
 (0)