Skip to content

Commit 5d44046

Browse files
committed
Link everything in the precedence table
This is intended to help navigate to what the thing it is referring to. Unfortunately this makes the markdown source a little messy, but other approaches weren't much better.
1 parent 49a9c8c commit 5d44046

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/expressions.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,25 @@ Binary Operators at the same precedence level are grouped in the order given by
7676

7777
| Operator/Expression | Associativity |
7878
|-----------------------------|---------------------|
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>&#124;</code> | left to right |
92-
| `==` `!=` `<` `>` `<=` `>=` | Require parentheses |
93-
| `&&` | left to right |
94-
| <code>&#124;&#124;</code> | left to right |
95-
| `..` `..=` | Require parentheses |
96-
| `=` `+=` `-=` `*=` `/=` `%=` <br> `&=` <code>&#124;=</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] [`&`][expr.operator.borrow] [`&mut`][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>&#124;</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>&#124;&#124;</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>&#124;=</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] | |
9898

9999
r[expr.operand-order]
100100
## Evaluation order of operands

0 commit comments

Comments
 (0)