Merge pull request #3158 from alexrp/incoming

Operator-assignment expressions -> Compound assignment expressions.
This commit is contained in:
Brian Anderson 2012-08-08 17:22:31 -07:00
commit 1ffaceb3c8

View file

@ -1927,13 +1927,15 @@ x <- copy y;
The former is just more terse and familiar.
#### Operator-assignment expressions
#### Compound assignment expressions
The `+`, `-`, `*`, `/`, `%`, `&`, `|`, `^`, `<<`, `>>`, and `>>>`
operators may be composed with the `=` operator. The expression `lval
OP= val` is equivalent to `lval = lval OP val`. For example, `x = x +
1` may be written as `x += 1`.
Any such expression always has the [`nil`](#primitive-types) type.
#### Operator precedence
The precedence of Rust binary operators is ordered as follows, going