Skip to content
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

Correct definition of lvalues, fixes #10890 #10982

Merged
merged 1 commit into from
Dec 16, 2013
Merged

Conversation

ezyang
Copy link
Contributor

@ezyang ezyang commented Dec 15, 2013

Based off of Niko's proposed definition of lvalues.

Signed-off-by: Edward Z. Yang ezyang@cs.stanford.edu

@@ -2177,8 +2177,7 @@ 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.
All other expressions are rvalues.
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.
Copy link
Member

Choose a reason for hiding this comment

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

This probably need line wrapping.

(I'm not sure if make tidy checks documentation, but even so, short lines are nice. :) )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK fixed!

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
bors added a commit that referenced this pull request Dec 15, 2013
Based off of Niko's proposed definition of lvalues.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
@bors bors closed this Dec 16, 2013
@bors bors merged commit b1b905f into rust-lang:master Dec 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants