Skip to content

Commit 1ffaceb

Browse files
committed
Merge pull request #3158 from alexrp/incoming
Operator-assignment expressions -> Compound assignment expressions.
2 parents 4f98e80 + d67314d commit 1ffaceb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/rust.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1927,13 +1927,15 @@ x <- copy y;
19271927

19281928
The former is just more terse and familiar.
19291929

1930-
#### Operator-assignment expressions
1930+
#### Compound assignment expressions
19311931

19321932
The `+`, `-`, `*`, `/`, `%`, `&`, `|`, `^`, `<<`, `>>`, and `>>>`
19331933
operators may be composed with the `=` operator. The expression `lval
19341934
OP= val` is equivalent to `lval = lval OP val`. For example, `x = x +
19351935
1` may be written as `x += 1`.
19361936

1937+
Any such expression always has the [`nil`](#primitive-types) type.
1938+
19371939
#### Operator precedence
19381940

19391941
The precedence of Rust binary operators is ordered as follows, going

0 commit comments

Comments
 (0)