Skip to content

Commit

Permalink
Merge pull request #1013 from tlyu/compound-assignment-unit
Browse files Browse the repository at this point in the history
Explicitly state result of compound assignment
  • Loading branch information
ehuss authored May 5, 2021
2 parents a66f0af + 0a626ce commit 5aa457b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/expressions/operator-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ fn example() {
}
```

Like assignment expressions, compound assignment expressions always produce [the unit value][unit].

<div class="warning">

Warning: The evaluation order of operands swaps depending on the types of the operands:
Expand Down

0 comments on commit 5aa457b

Please sign in to comment.