Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0a626ce

Browse files
committedMay 4, 2021
Explicitly state result of compound assignment
The existing text implies but doesn't explicitly say that compound assignment produces the unit value. A reader could also infer it from the signatures of the compound assignment trait functions, but it seems better to be explicit.
1 parent a66f0af commit 0a626ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/expressions/operator-expr.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ fn example() {
470470
}
471471
```
472472

473+
Like assignment expressions, compound assignment expressions always produce [the unit value][unit].
474+
473475
<div class="warning">
474476

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

0 commit comments

Comments
 (0)
Please sign in to comment.