Skip to content

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

Merged
nikomatsakis merged 2 commits into
rust-lang:masterfrom
pnkfelix:add-sqbracket-to-follow-of-ty
Jan 22, 2016
Merged

Add [ to the FOLLOW(ty) in macro future-proofing rules.#1462
nikomatsakis merged 2 commits into
rust-lang:masterfrom
pnkfelix:add-sqbracket-to-follow-of-ty

Conversation

@pnkfelix

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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
Copy Markdown
Contributor 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
Copy Markdown
Contributor

Yes please.

@nikomatsakis

Copy link
Copy Markdown
Contributor

👍

@emberian

Copy link
Copy Markdown
Contributor

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

@durka

durka commented Jan 18, 2016

Copy link
Copy Markdown
Contributor

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

@emberian

Copy link
Copy Markdown
Contributor

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

@durka

durka commented Jan 18, 2016

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

nikomatsakis commented Jan 19, 2016 via email

Copy link
Copy Markdown
Contributor

@nikomatsakis

Copy link
Copy Markdown
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
Copy Markdown
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