Skip to content

Commit abc7493

Browse files
authored
Merge pull request #282 from matthewjasper/operator-precendence
Fixes for operator precedence
2 parents 93c2953 + 376e2cb commit abc7493

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/expressions.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ and blocks again can recursively nest inside each other to an arbitrary depth.
4444
## Expression precedence
4545

4646
The precedence of Rust operators and expressions is ordered as follows, going
47-
from strong to weak. Binary Operators at the same precedence level are
48-
evaluated in the order given by their associativity.
47+
from strong to weak. Binary Operators at the same precedence level are grouped
48+
in the order given by their associativity.
4949

5050
| Operator/Expression | Associativity |
5151
|-----------------------------|---------------------|
@@ -55,7 +55,7 @@ evaluated in the order given by their associativity.
5555
| Function calls, array indexing | |
5656
| `?` | |
5757
| Unary `-` `*` `!` `&` `&mut` | |
58-
| `as` `:` | left to right |
58+
| `as` | left to right |
5959
| `*` `/` `%` | left to right |
6060
| `+` `-` | left to right |
6161
| `<<` `>>` | left to right |
@@ -66,7 +66,6 @@ evaluated in the order given by their associativity.
6666
| `&&` | left to right |
6767
| <code>&#124;&#124;</code> | left to right |
6868
| `..` `..=` | Require parentheses |
69-
| `<-` | right to left |
7069
| `=` `+=` `-=` `*=` `/=` `%=` <br> `&=` <code>&#124;=</code> `^=` `<<=` `>>=` | right to left |
7170
| `return` `break` closures | |
7271

0 commit comments

Comments
 (0)