Skip to content

Commit

Permalink
Correct definition of lvalues, fixes #10890
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
  • Loading branch information
ezyang committed Dec 15, 2013
1 parent 8f6df87 commit b1b905f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/rust.md
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

5 comments on commit b1b905f

@bors
Copy link
Contributor

@bors bors commented on b1b905f Dec 15, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from pcwalton
at ezyang@b1b905f

@bors
Copy link
Contributor

@bors bors commented on b1b905f Dec 15, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging ezyang/rust/lvalue-def = b1b905f into auto

@bors
Copy link
Contributor

@bors bors commented on b1b905f Dec 15, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ezyang/rust/lvalue-def = b1b905f merged ok, testing candidate = 9eb89a6

@bors
Copy link
Contributor

@bors bors commented on b1b905f Dec 16, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on b1b905f Dec 16, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 9eb89a6

Please sign in to comment.