@@ -76,25 +76,25 @@ Binary Operators at the same precedence level are grouped in the order given by
76
76
77
77
| Operator/Expression | Associativity |
78
78
| -----------------------------| ---------------------|
79
- | Paths | |
80
- | Method calls | |
81
- | Field expressions | left to right |
82
- | Function calls, array indexing | |
83
- | ` ? ` | |
84
- | Unary ` - ` ` * ` ` ! ` ` & ` ` &mut ` | |
85
- | ` as ` | left to right |
86
- | ` * ` ` / ` ` % ` | left to right |
87
- | ` + ` ` - ` | left to right |
88
- | ` << ` ` >> ` | left to right |
89
- | ` & ` | left to right |
90
- | ` ^ ` | left to right |
91
- | <code >| ; </code > | left to right |
92
- | ` == ` ` != ` ` < ` ` > ` ` <= ` ` >= ` | Require parentheses |
93
- | ` && ` | left to right |
94
- | <code >| ;| ; </code > | left to right |
95
- | ` .. ` ` ..= ` | Require parentheses |
96
- | ` = ` ` += ` ` -= ` ` *= ` ` /= ` ` %= ` <br > ` &= ` <code >| ; =</code > ` ^= ` ` <<= ` ` >>= ` | right to left |
97
- | ` return ` ` break ` closures | |
79
+ | [ Paths] [ expr.path ] | |
80
+ | [ Method calls] [ expr.method ] | |
81
+ | [ Field expressions] [ expr.field ] | left to right |
82
+ | [ Function calls] [ expr.call ] , [ array indexing] [ expr.array.index ] | |
83
+ | [ ` ? ` ] [ expr.try ] | |
84
+ | Unary [ ` - ` ] [ expr.negate ] [ ` ! ` ] [ expr.negate ] [ ` * ` ] [ expr.deref ] [ borrow ] [ expr.operator.borrow ] | |
85
+ | [ ` as ` ] [ expr.as ] | left to right |
86
+ | [ ` * ` ] [ expr.arith-logic ] [ ` / ` ] [ expr.arith-logic ] [ ` % ` ] [ expr.arith-logic ] | left to right |
87
+ | [ ` + ` ] [ expr.arith-logic ] [ ` - ` ] [ expr.arith-logic ] | left to right |
88
+ | [ ` << ` ] [ expr.arith-logic ] [ ` >> ` ] [ expr.arith-logic ] | left to right |
89
+ | [ ` & ` ] [ expr.arith-logic ] | left to right |
90
+ | [ ` ^ ` ] [ expr.arith-logic ] | left to right |
91
+ | [ <code >| ; </code >] [ expr.arith-logic ] | left to right |
92
+ | [ ` == ` ] [ expr.cmp ] [ ` != ` ] [ expr.cmp ] [ ` < ` ] [ expr.cmp ] [ ` > ` ] [ expr.cmp ] [ ` <= ` ] [ expr.cmp ] [ ` >= ` ] [ expr.cmp ] | Require parentheses |
93
+ | [ ` && ` ] [ expr.bool-logic ] | left to right |
94
+ | [ <code >| ;| ; </code >] [ expr.bool-logic ] | left to right |
95
+ | [ ` .. ` ] [ expr.range ] [ ` ..= ` ] [ expr.range ] | Require parentheses |
96
+ | [ ` = ` ] [ expr.assign ] [ ` += ` ] [ expr.compound-assign ] [ ` -= ` ] [ expr.compound-assign ] [ ` *= ` ] [ expr.compound-assign ] [ ` /= ` ] [ expr.compound-assign ] [ ` %= ` ] [ expr.compound-assign ] <br > [ ` &= ` ] [ expr.compound-assign ] [ <code >| ; =</code >] [ expr.compound-assign ] [ ` ^= ` ] [ expr.compound-assign ] [ ` <<= ` ] [ expr.compound-assign ] [ ` >>= ` ] [ expr.compound-assign ] | right to left |
97
+ | [ ` return ` ] [ expr.return ] [ ` break ` ] [ expr.loop.break ] [ closures] [ expr.closure ] | |
98
98
99
99
r[ expr.operand-order]
100
100
## Evaluation order of operands
0 commit comments