File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1476,11 +1476,15 @@ Expressions are divided into two main categories: _lvalues_ and _rvalues_.
1476
1476
Likewise within each expression, sub-expressions may occur in _ lvalue context_ or _ rvalue context_ .
1477
1477
The evaluation of an expression depends both on its own category and the context it occurs within.
1478
1478
1479
- Path, field and index expressions are lvalues.
1479
+ [ Path] ( #path-expressions ) , [ field] ( #field-expressions ) and [ index] ( #index-expressions ) expressions are lvalues.
1480
1480
All other expressions are rvalues.
1481
1481
1482
- The left operand of an assignment, compound-assignment, or binary move expression is an lvalue context,
1483
- as is the single operand of a borrow, unary copy or move expression, and _ both_ operands of a swap expression.
1482
+ The left operand of an [ assignment] ( #assignment-expressions ) or
1483
+ [ compound-assignment] ( #compound-assignment-expressions ) expression is an lvalue context,
1484
+ as is the single operand of a unary [ borrow] ( #unary-operator-expressions ) ,
1485
+ or [ move] ( #unary-move-expressions ) expression,
1486
+ and _ both_ operands of a [ swap] ( #swap-expressions )
1487
+ or [ binary move] ( #binary-move-expressions ) expression.
1484
1488
All other expression contexts are rvalue contexts.
1485
1489
1486
1490
When an lvalue is evaluated in an _ lvalue context_ , it denotes a memory location;
You can’t perform that action at this time.
0 commit comments