diff --git a/doc/rust.md b/doc/rust.md index a01a28f68a3..4b3b9a4c158 100644 --- a/doc/rust.md +++ b/doc/rust.md @@ -1476,11 +1476,15 @@ Expressions are divided into two main categories: _lvalues_ and _rvalues_. Likewise within each expression, sub-expressions may occur in _lvalue context_ or _rvalue context_. The evaluation of an expression depends both on its own category and the context it occurs within. -Path, field and index expressions are lvalues. +[Path](#path-expressions), [field](#field-expressions) and [index](#index-expressions) expressions are lvalues. All other expressions are rvalues. -The left operand of an assignment, compound-assignment, or binary move expression is an lvalue context, -as is the single operand of a borrow, unary copy or move expression, and _both_ operands of a swap expression. +The left operand of an [assignment](#assignment-expressions) or +[compound-assignment](#compound-assignment-expressions) expression is an lvalue context, +as is the single operand of a unary [borrow](#unary-operator-expressions), +or [move](#unary-move-expressions) expression, +and _both_ operands of a [swap](#swap-expressions) +or [binary move](#binary-move-expressions) expression. All other expression contexts are rvalue contexts. When an lvalue is evaluated in an _lvalue context_, it denotes a memory location;