Skip to content

Commit 5aa457b

Browse files
authored
Merge pull request rust-lang#1013 from tlyu/compound-assignment-unit
Explicitly state result of compound assignment
2 parents a66f0af + 0a626ce commit 5aa457b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/expressions/operator-expr.md

+2
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)