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

Add [ to the FOLLOW(ty) in macro future-proofing rules. #1462

Merged
merged 2 commits into from
Jan 22, 2016

Conversation

pnkfelix
Copy link
Member

Add [ to the FOLLOW(ty) in macro future-proofing rules (RFC #550 )

This is to address the regression rust-lang/rust#30923

@pnkfelix
Copy link
Member Author

Discussed with lang-team at meeting tonight; putting into Final Comment Period (FCP) now.

(The reason for the quick FCP is because if we want to fix this, the only sensible time to do so is during the beta period, before the warning is promoted to a hard error.)

@pnkfelix
Copy link
Member Author

Hear ye, hear ye. This RFC is now entering final comment period.

@pnkfelix pnkfelix added T-lang Relevant to the language team, which will review and decide on the RFC. final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. labels Jan 14, 2016
@retep998
Copy link
Member

Yes please.

@nikomatsakis
Copy link
Contributor

👍

@emberian
Copy link
Member

Seems somewhat risky, were "type-level integers" to be added and made usable where constexprs are. Consider impl <N: int> SomeStruct<SomeConstantArray[N]>.

@durka
Copy link
Contributor

durka commented Jan 18, 2016

@cmr isn't that expr [, not ty [?

@emberian
Copy link
Member

@durka I have no idea, but I wouldn't expect so. Lots of finnicky details around those proposals.

@durka
Copy link
Contributor

durka commented Jan 18, 2016

Well maybe I don't understand what you mean. What is SomeConstantArray? Seems to me it's an ident or an expr, but not a type.

Certainly merging this RFC restricts future syntax choices slightly. I don't really have an opinion one way or the other, except I'm against breaking all of @retep998's crates :)

@emberian
Copy link
Member

In general a proposal could have the moral equivalent of expressions appearing in type-position. Whether they'd be treated as expr, for macros, or not I do not know.

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Jan 19, 2016 via email

@nikomatsakis
Copy link
Contributor

Huzzah! The language design subteam has decided to accept this RFC.

@nikomatsakis nikomatsakis merged commit 6fef0b3 into rust-lang:master Jan 22, 2016
@nikomatsakis
Copy link
Contributor

Created tracking issue rust-lang/rust#31135 for this change specifically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Macro related proposals and issues A-syntax Syntax related proposals & ideas final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. T-lang Relevant to the language team, which will review and decide on the RFC.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants