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

Projects
None yet
6 participants
@pnkfelix
Copy link
Member

pnkfelix commented Jan 14, 2016

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

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

@pnkfelix

This comment has been minimized.

Copy link
Member Author

pnkfelix commented Jan 14, 2016

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

This comment has been minimized.

Copy link
Member Author

pnkfelix commented Jan 14, 2016

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

@retep998

This comment has been minimized.

Copy link
Member

retep998 commented Jan 15, 2016

Yes please.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 15, 2016

👍

@cmr

This comment has been minimized.

Copy link
Member

cmr commented Jan 18, 2016

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

@durka

This comment has been minimized.

Copy link
Contributor

durka commented Jan 18, 2016

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

@cmr

This comment has been minimized.

Copy link
Member

cmr commented Jan 18, 2016

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

@durka

This comment has been minimized.

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 :)

@cmr

This comment has been minimized.

Copy link
Member

cmr commented Jan 18, 2016

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

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 19, 2016

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 22, 2016

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

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

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 22, 2016

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
You can’t perform that action at this time.