|
4 | 4 |
|
5 | 5 | * `as`: primitive casting. See [Casting Between Types (`as`)]. |
6 | 6 | * `break`: break out of loop. See [Loops (Ending Iteration Early)]. |
7 | | -* `const`: constant items. See [`const` and `static`]. |
| 7 | +* `const`: constant items and constant raw pointers. See [`const` and `static`], [Raw Pointers]. |
8 | 8 | * `continue`: continue to next loop iteration. See [Loops (Ending Iteration Early)]. |
9 | 9 | * `crate`: external crate linkage. See [Crates and Modules (Importing External Crates)]. |
10 | 10 | * `else`: fallback for `if` and `if let` constructs. See [`if`], [`if let`]. |
|
39 | 39 |
|
40 | 40 | ## Operators and Symbols |
41 | 41 |
|
42 | | -* `!` (`expr!(…)`, `expr!{…}`, `expr![…]`): denotes macro expansion. See [Macros]. |
| 42 | +* `!` (`ident!(…)`, `ident!{…}`, `ident![…]`): denotes macro expansion. See [Macros]. |
43 | 43 | * `!` (`!expr`): bitwise or logical complement. Overloadable (`Not`). |
44 | 44 | * `%` (`expr % expr`): arithmetic remainder. Overloadable (`Rem`). |
45 | 45 | * `%=` (`var %= expr`): arithmetic remainder & assignment. |
|
89 | 89 | * `^=` (`var ^= expr`): bitwise exclusive or & assignment. |
90 | 90 | * `|` (`expr | expr`): bitwise or. Overloadable (`BitOr`). |
91 | 91 | * `|` (`pat | pat`): pattern alternatives. See [Patterns (Multiple patterns)]. |
| 92 | +* `|` (`|…| expr`): closures. See [Closures]. |
92 | 93 | * `|=` (`var |= expr`): bitwise or & assignment. |
93 | 94 | * `||` (`expr || expr`): logical or. |
94 | 95 | * `_`: "ignored" pattern binding. See [Patterns (Ignoring bindings)]. |
|
105 | 106 | * `br"…"`, `br#"…"#`, `br##"…"##`, …: raw byte string literal, combination of raw and byte string literal. See [Reference (Raw Byte String Literals)]. |
106 | 107 | * `'…'`: character literal. See [Primitive Types (`char`)]. |
107 | 108 | * `b'…'`: ASCII byte literal. |
| 109 | +* `|…| expr`: closure. See [Closures]. |
108 | 110 |
|
109 | 111 | <!-- Path-related syntax --> |
110 | 112 |
|
|
173 | 175 | * `[…]`: array literal. See [Primitive Types (Arrays)]. |
174 | 176 | * `[expr; len]`: array literal containing `len` copies of `expr`. See [Primitive Types (Arrays)]. |
175 | 177 | * `[type; len]`: array type containing `len` instances of `type`. See [Primitive Types (Arrays)]. |
| 178 | +* `expr[expr]`: collection indexing. Overloadable (`Index`, `IndexMut`). |
| 179 | +* `expr[..]`, `expr[a..]`, `expr[..b]`, `expr[a..b]`: collection indexing pretending to be collection slicing, using `Range`, `RangeFrom`, `RangeTo`, `RangeFull` as the "index". |
176 | 180 |
|
177 | 181 | [`const` and `static` (`static`)]: const-and-static.html#static |
178 | 182 | [`const` and `static`]: const-and-static.html |
|
0 commit comments