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

Nightly regression: empty lifetime list in for<lifetime-list> doesn't parse anymore #37733

Closed
petrochenkov opened this issue Nov 12, 2016 · 5 comments
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@petrochenkov
Copy link
Contributor

Code:

type A = for<> fn(); // error: trailing attribute after lifetime parameters

fn main() {}

Compiles on 1.13-stable,beta, fails on 1.14-nightly.

@TimNN
Copy link
Contributor

TimNN commented Nov 12, 2016

I think this was a deliberate change, I'm pretty sure I remember a PR who's whole point was to disallow exactly that (although I can't finde the PR right now). (Forget that, see below).

@TimNN
Copy link
Contributor

TimNN commented Nov 12, 2016

Apart from that, this was introduced between nightly-2016-09-30 and nightly-2016-10-03 (Changes).

@TimNN TimNN added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Nov 12, 2016
@petrochenkov
Copy link
Contributor Author

petrochenkov commented Nov 12, 2016

I strongly suspect this is an unintended side effect of #34764.
Prohibiting this deliberately doesn't make any sense, empty lists are allowed in (almost) all other possible contexts.

@TimNN
Copy link
Contributor

TimNN commented Nov 12, 2016

Yeah, I probably mis-remembered :(

I agree that this was probably a side effect of #34764.

@TimNN TimNN added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Nov 12, 2016
@est31
Copy link
Member

est31 commented Nov 13, 2016

In fact, this fails too:

type B = for<'a,> fn();

bors added a commit that referenced this issue Nov 13, 2016
Fix empty lifetime list or one with trailing comma being rejected

Fixes #37733
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants