Skip to content

Commit 2b59834

Browse files
committed
Corrections to syntax index.
* removed reference to struct fields from `mut` description. * changed `..` pattern example to not be syntactically bogus. * changed `@` pattern example for similar reasons. (Thanks petrochenkov)
1 parent b78614f commit 2b59834

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/trpl/syntax-index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* `match`: pattern matching. See [Match].
2222
* `mod`: module declaration. See [Crates and Modules (Defining Modules)].
2323
* `move`: part of closure syntax. See [Closures (`move` closures)].
24-
* `mut`: denotes mutability in pointer types, pattern bindings, and `struct` fields. See [Mutability].
24+
* `mut`: denotes mutability in pointer types and pattern bindings. See [Mutability].
2525
* `pub`: denotes public visibility in `struct` fields, `impl` blocks, and modules. See [Crates and Modules (Exporting a Public Interface)].
2626
* `ref`: by-reference binding. See [Patterns (`ref` and `ref mut`)].
2727
* `return`: return from function. See [Functions (Early Returns)].
@@ -63,7 +63,7 @@
6363
* `.` (`expr.ident`): member access. See [Structs], [Method Syntax].
6464
* `..` (`..`, `expr..`, `..expr`, `expr..expr`): right-exclusive range literal.
6565
* `..` (`..expr`): struct literal update syntax. See [Structs (Update syntax)].
66-
* `..` (`..ident`): "and the rest" pattern binding. See [Patterns (Ignoring bindings)].
66+
* `..` (`variant(x, ..)`, `struct_type { x, .. }`): "and the rest" pattern binding. See [Patterns (Ignoring bindings)].
6767
* `...` (`expr ... expr`): inclusive range pattern. See [Patterns (Ranges)].
6868
* `/` (`expr / expr`): arithmetic division. Overloadable (`Div`).
6969
* `/=` (`var /= expr`): arithmetic division & assignment.
@@ -83,7 +83,7 @@
8383
* `>=` (`var >= expr`): greater-than or equal-to comparison. Overloadable (`Cmp`, `PartialCmp`).
8484
* `>>` (`expr >> expr`): right-shift. Overloadable (`Shr`).
8585
* `>>=` (`var >>= expr`): right-shift & assignment.
86-
* `@` (`expr @ expr`): pattern binding. See [Patterns (Bindings)].
86+
* `@` (`ident @ pat`): pattern binding. See [Patterns (Bindings)].
8787
* `^` (`expr ^ expr`): bitwise exclusive or. Overloadable (`BitXor`).
8888
* `^=` (`var ^= expr`): bitwise exclusive or & assignment.
8989
* `|` (`expr | expr`): bitwise or. Overloadable (`BitOr`).

0 commit comments

Comments
 (0)