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

Disallow struct literals in ambiguous positions. #92

Merged
merged 1 commit into from
Jun 10, 2014

Conversation

nrc
Copy link
Member

@nrc nrc commented May 28, 2014

Do not identify struct literals by searching for :. Instead define a sub-category of expressions which excludes struct literals and re-define for, if, and other expressions which take an expression followed by a block (or non-terminal which can be replaced by a block) to take this sub-category, instead of all expressions.

Do not identify struct literals by searching for `:`. Instead define a sub-category of expressions which excludes struct literals and re-define `for`, `if`, and other expressions which take an expression followed by a block (or non-terminal which can be replaced by a block) to take this sub-category, instead of all expressions.
block ::= `{` (e;)* e? `}`
```

`e' is just e without struct literal expressions. We use e' instead of e
Copy link
Contributor

Choose a reason for hiding this comment

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

Formatting issue here.

@nikomatsakis
Copy link
Contributor

+1

@alexcrichton
Copy link
Member

As discussed in today's meeting this has been agreed upon.

@ranweiler ranweiler mentioned this pull request Jul 20, 2016
@Centril Centril added A-syntax Syntax related proposals & ideas A-expressions Term language related proposals & ideas labels Nov 23, 2018
wycats pushed a commit to wycats/rust-rfcs that referenced this pull request Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-expressions Term language related proposals & ideas A-syntax Syntax related proposals & ideas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants