Skip to content

Correct definition of lvalues, fixes #10890 #10982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion doc/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -2177,7 +2177,11 @@ 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](#path-expressions), [field](#field-expressions) and [index](#index-expressions) expressions are lvalues.
An lvalue is an expression that represents a memory location. These
expressions are [paths](#path-expressions) (which refer to local
variables, function and method arguments, or static variables),
dereferences (`*expr`), [indexing expressions](#index-expressions)
(`expr[expr]`), and [field references](#field-expressions) (`expr.f`).
All other expressions are rvalues.

The left operand of an [assignment](#assignment-expressions),
Expand Down