Skip to content

Small fixes to the expressions section #126

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
Oct 4, 2017

Conversation

matthewjasper
Copy link
Contributor

A number of small changes to the expressions section.

  • Extend the operator precedence section to be expression precedence (Fixes expressions precedence #107)
  • Improve constant expressions (Fixes Improve Constant Expression and Static Item sections #120)
  • Don't (incorrectly) imply that one can move out of the fields of a boxed struct separately.
  • Mention that methods that aren't visible aren't used in type resolution.
  • Expressions bound to patterns are always lvalues (so can be unsized) even when moved from.

Copy link
Contributor

@Havvy Havvy left a comment

Choose a reason for hiding this comment

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

r+ after the comma is fixed.


I don't have any knowledge about the expression precedence to know if it is correct or where I'd get that information, so I'm trusting that this is correct. If anybody who knows would like to verify, that would be great.

static variables, [dereferences] (`*expr`), [array indexing] expressions
(`expr[expr]`), [field] references (`expr.f`) and parenthesized lvalue
expressions. All other expressions are rvalues.
are [paths](#path-expressions) which refer to local variables, static variables
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing comma after static variables.

@matthewjasper matthewjasper reopened this Oct 3, 2017
@Havvy
Copy link
Contributor

Havvy commented Oct 4, 2017

💟 Thanks.

@Havvy Havvy merged commit 16c2cc2 into rust-lang:master Oct 4, 2017
@matthewjasper matthewjasper deleted the expressions-fixes branch October 18, 2018 21:00
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.

2 participants