Skip to content

Commit 2c34ffa

Browse files
committed
manual: link to expressions in lval/rval section.
1 parent c46706f commit 2c34ffa

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

doc/rust.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,11 +1476,15 @@ Expressions are divided into two main categories: _lvalues_ and _rvalues_.
14761476
Likewise within each expression, sub-expressions may occur in _lvalue context_ or _rvalue context_.
14771477
The evaluation of an expression depends both on its own category and the context it occurs within.
14781478

1479-
Path, field and index expressions are lvalues.
1479+
[Path](#path-expressions), [field](#field-expressions) and [index](#index-expressions) expressions are lvalues.
14801480
All other expressions are rvalues.
14811481

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.
14841488
All other expression contexts are rvalue contexts.
14851489

14861490
When an lvalue is evaluated in an _lvalue context_, it denotes a memory location;

0 commit comments

Comments
 (0)